You are on page 1of 4

C# QUESTIONS

Participants Name: Date:


Post Applied For: Marks Secured:

Choose the correct one from the following questions.

1. Structures are ___________ types.

1. User defined 3. Derived


2. Primitive 4. None

2. 'Char' variable occupies____________ bytes

1. 4 3. I
2. 2 4. None

3. 'Internal' access specifier, we can use

1. Within a namespace 3. Within a subclass only


2. Different name spaces 4. None

4. Constructor returns ________________.

1. Void 3. Float
2. Int 4. None

5. We cannot create an object of _______________.

1. Abstract class 3. Base class


2. Derived class 4. None

6. We have only signature of the methods in_____________.

1. Structures 3. Interfaces
2. Abstract class 4. None

7. We can modify read-only data in _____________.

1. Constructors only 3. Static methods


2. Instance methods 4. None

8. 'this' cannot be used in

1. Instance methods 3. Properties


2. Static methods 4. None
9. Static constructors have the following access specifier

1. Public 3. Protected
2. Private 4. None

10. 'const' variables are by default

1. Read only 3. Static


2. Instance 4. None

11. _________ arrays may have different number of columns

1. Jagged 3. Rectangular
2. 1d-array 4. None

12. int [ ,] arr=new int[2,4];

arr.1ength gives

1. 2 3. 8
2. 4 4. None

13. Without initial values if you want to pass argument in the function, we have to
use _____________parameter

1. val 3. ref
2. out 4. None

14. Property is a

1. Variable 3. Data
2. Method 4. None

15. If you want define read-only property, we have to use

1. Get 3. Read only


2. Set 4. None

16. ____________ methods doesn't have body with in a class


1. Static 3. Abstract
2. Instance 4. None

17. ________ access specifier have to use in interfaces

1. Internal 3. Public
2. Protected 4. None

18. Finally block will execute, if______________

1. Error occurs 3. Error occurs or not


2. No error 4. None

19. Using exception-handling, we can avoid

1. Compile-time errors 3. Logical errors


2. Run-time errors 4. None

20. We may have ___________ number of catch statements followed by try

1. 1 3. 3
2. N 4. None

Paper 1
C# ANSWERS

1. a 2. b 3. a 4. d
5. a 6. c 7. a 8. b
9. d 10. c 11. a 12. c
13. b 14. d 15. a 16. c
17. d 18. c 19. b 20. b

You might also like