1) What is the Common Language Runtime (CLR)?
- A compiler for C#
- An integratcd development environment
- A virtual machine for executing .NET code
- A database management system
2) Which of the following is the root of the hierarchy Of all .NET types?
- System.Base
- System.Object
- Systcm.Parent
- System.Root
3) What is the syntax for a for loop in C#?
- for (initializer; condition; iterator) {// code block}
- for (condition; initializer; iterator) {// code block}
- for (condition; iterator; initializer) {// code block}
- for (iterator; condition; initializer) {// code block}
4) How do you declare an array in C#?
- int array = new int[];
- int array = new array int[];
- int array = new int();
- int[] array = new int[];
5) Which of the following methods is used to convert a string to uppercase in C#?
- ToUpper()
- ToLower()
- Replace()
- Trim()
6) Which of the following is NOT a feature of a structure in C#?
- Can implement interfaces
- Cannot inherit from other structures or classes
- Can have properties and methods
- Can have a destructor
7) Which keyword is used to pass a pointer as a parameter by reference in C#?
- var
- ref
- out
- unsafe
8) Which namespace is used to connect to a database in C#?
- System.Data.SqlClient
- System.Data.OracIeCIient
- System.Data.OleDb
- All ofthe above
9) Which of the following statement is true for a Structure in C#?
- It can hold similar data types only
- It can hold dissimilar data type
- It can hold integer only
- All of above
“Group B”
Short Answer Questions [5*5 = 25]
10. Describe the .NET framework and it’s features.
11. How do you declare a variable in C#? What are the different data types of variables in C#?
OR Describe a namespace in How is it used in programming?
12. Write a program to find the greatest number among three user input numbers in C#.
OR Explain Concat() and Trim() string functions with examples in C#.
13. How do you use an array in CP? Explain with an example.
14. What is a pointer in C#? Give an example of passing pointer as a parameter to methods.
“Group C”
Long Answer Questions [2*8 =16]
15. Differentiate between the while and for loop in C#. Explain with an example.
16. Explain the database connection procedure in C# to develop the application with an example.
OR Write a program to enter the details of three employees (ID and name) and display them using structure.