0% found this document useful (0 votes)
34 views7 pages

Dot Net

dot net question

Uploaded by

kumarloresh143
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views7 pages

Dot Net

dot net question

Uploaded by

kumarloresh143
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

GITA AUTONOMOUS COLLEGE, BHUBANESWAR

Question Bank
Subject : DotNet Programming, MCA, 3rd Semester

Short Type Questions


1. What do you mean by explicit conversions? Explain with an example.

2. What are the benefits of using C#?

3. What does the acronym CLR stand for? Briefly explain.

4. Can you name the types of classes in C#?

5. Is it possible to get the array index using the for each loop?

6. Can override of a function be possible in the same class?

7. How do you do Exception Handling in C#?

8. Can you name some access modifiers available in C#?

9. What is a namespace? Give an example.

10. What are uses of the CLR Garbage Collector?


11. What are constructors in C#?
12. What is the difference between abstract class and interface in C#?
13. What are sealed classes in C#?
14. What are Custom Exceptions?
15. What is Console application?
16. What are the namespaces used in ADO.Net to connect to a database?
17. What is Dataset Object?
18. What is Data Adapter?
19. What is the use of SqlCommand object?
20. What is Data view?
21. Describe the Master Page.
22. Differentiate between a HyperLink control and a LinkButton control.
23. Differentiate between early binding and late binding.
24. Summarize the Four Steps for Compiling C# Code.
25. Describe the C# struct Data Type.
26. What do you mean by run-time polymorphism?
27. What is the use of Convert Class in C#.? Write 4 methods of Convert Class.
28. Which of the components of the .NET framework provide an extensible set of classes that
can be used by any .NET compliant programming language?
29. Which of the .NET components can be used to remove unused references from the
managed heap?
30. Find out output of the following method.
static void Main(string[] args)
{
string st = "abc";
int v = st[0];
++v;
Console.WriteLine((char)v);
}

31. Find out output of the following method.


static void Main(string[] args)
{
int number1 = 1234;
int number2 = 0;
for (; number1 > 0; number1 /= 10)
number2 = (number2 * 10) + (number1 % 10);

Console.WriteLine("Number1={0} and Number2={1}", number1, number2);

32. Find out output of the following method.


static void Main(string[] args)
{
string st1 = "welcome";
for (int index = 0; index < st1.Length; ++index)
Console.WriteLine(st1[index++]);

}
33. Find out output of the following method.
static void Main(string[] args)
{
int[] arr = { 55, 44, 33, 22, 11 };
Array.Sort(arr);
for (int i = 0; i < arr.Length; ++i)
++arr[i];
foreach (int value in arr)
Console.WriteLine(value);

34. Find out output of the following method.


static void Main(string[] args)
{
List<int> list = new List<int>();
list.Add(10);
list.Add(20);
list.Add(30);
int result = list.Find(x => x == 40);
Console.WriteLine(result);

35. Find out output of the following method.


static void Main(string[] args)
{
string collname = "gita autonomous college, bhubaneswar";
TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
collname = ti.ToTitleCase(collname);
Console.WriteLine(collname);

Focused Type Questions


1. Write basic features of C#.Net.

2. Can override of a same method be possible in the derive class? Explain with an example.

3. How do you do Exception Handling in C#? Give a suitable example.

4. Define Abstract class in C# with an example.

5. What’s the role of the access modifier in C#? Explain with examples.
6. Name the different ways in which you can pass parameters to a method in C#.Explain
with examples.

7. Define dynamic type variables in C#. .Explain with an example.

8. What are jagged arrays? Give an example.

9. What are the constructors? How do we pass value for child class constructor in C#.Net.?

10. What’s the Difference between Managed & Unmanaged Code?

11. What is the difference between a struct and a class in C#?

12. What is the difference between constant and readonly in C#? Explain with an example.

13. What are partial classes in C#? Why do we need partial classes?

14. What is the importance of “this” keyword? Explain with an example.

15. Differentiate between Run-Time Error and Logical Error with examples.

16. What are types of loops are available in C#.Net. Describe each loop with an example.

17. What are the different classes in System.Data.SqlClient? Briefly explain.

18. What are all the different methods under SqlCommand class?

19. What are the data providers in ADO.NET framework?

20. Describe state management in ASP.NET.

21. Explain client side state management system in ASP.Net.

22. Explain cookies with suitable example.

23. Describe the advantages and disadvantages of cookies.

24. What are the different methods of navigation in ASP.NET?

25. What are difference between Server.Response() and Server.Transfer()?

26. Explain how a web application works.

27. Describe the Events in the Life Cycle of a Web Application.

28. What are the Web Form Events available in ASP.NET?


29. Difference between Client applications and browser-based application.

30. What are differences between value and reference types in C#.Net?

31. What is importance of windows forms in .NET?


32. What is server-side control? Write drawbacks of server-side control.
33. Write basic difference between client-side and server-side events.

34. How do we create a MDI parent form in C#.Net? Explain with an example.

35. What are differences between ExecuteNonQuery() and ExecuteScalar() ?

Long Type Questions


1. What is property? Write five property names in windows form. How to change property
of windows form at run time.

2. Write a method “AddDepartment()” which takes a parameter DName as string and return
Boolean value.

a. It will return true after successfully adding a new department in Department Table,
In any other cases, It will return false;
Assume : Server Name :MyServer, Database : Payroll, User and Password : payroll and
Table : Department has two attributes Did and DName, and Did is autogenerated field.

3. What are built-in controls in Windows Form? Write 10 difference built-in control names
and its uses.
4. What is Page.PostBack event? Explain with an example.
5. Write a program in C# to reverse a string.
6. Write a program to convert 2-D Array into 1-D Array.
7. Write a console program in C# to find first 10 terms of the following series and to print 2
terms per line.
1,1,
2,3,
5,8
8. Write a web form program (LoginForm.aspx) to validate UserId and Password.
9. Write a console program in C# to find out last date of an input date.
10. Write a C# Sharp program that compares two dates.
11. Write a program in C# Sharp to display the individual digits of a given number.
12. Write a C# Sharp program that takes userid and password as input (string type). After 3
unsuccessful attempts, the user will be rejected.
13. Write a program to accept 10 integers to an array and perform the below actions
1) Print the elements in ascending order.
2) Find the min value, max value entered.
3) Print the sum first and second elements in the array

14. Create an Employee class with the following specifications.

i.Employee Name as string.

ii.Basic Salary,HRA,DA,TAX,Gross Pay and Net Salary as decimal.

iii.Calculate the HRA (15% of Basic Salary), DA (10% of Basic Salary, Gross
Pay (Basic Salary + HRA+DA), Tax (8% of Gross Pay) and Net Pay (Gross Pay -
Tax).

A Constructor to allow to define the Employee Name and Basic Salary.

A method CalculateNetPay() to calculate the HRA,DA,Tax, Gross and Net Pay


values using the criteria mentioned in the Point iii.

15. Write a method GetLastEmpNo(), which will return last EmpNo+1 as long using
ExecuteScalar() method.
16. Write a method IsExistEmployee() which take a parameter empno as long and return
boolean value.
i. It will return true if empno is already exist. In any other cases, it will return false.
17. Write a method PoulateEmployee(), which will display detail of employees in
GridView1.
18. What are differences between Array and Arraylist? Explain with examples.
19. Write a console program to merge two 1-D array with same size and find out sum of all
elements of new array.
20. Write a console program to add 10 random numbers between 10 and 100 in List Object
and print the List.

You might also like