You are on page 1of 2

T. Y. B. Sc.

IT

SEMESTER VI
Chap 12 Test
Marks Date____________
Students Name: ____________________________________________ Roll
No:
1

Write the proper


match
1. overload : ______
2. params : _______
3. add(10,20); :
____
4. abstract : _______

a) Must be
overridden
b) Runtime
c) Variable
argument
d) Compiler fix
e) One name many
form
2 Restrictions for params
1)
__________________________________________
___________________________________________
2)
__________________________________________
___________________________________________
List 8 modifiers used with method
declaration in class
___________________________________________
___________________________________________
Use of static void Main().
___________________________________________
___________________________________________
State whether the statements are true or
false
1) Static Method can be overloaded. ______
2) Method can define nested method.
______
3) Every method must have return type
_____
4) Method can declare a constant ______
Comment on out keyword in
_________________
____________________________________________
____________________________________________

10

What if Method is passed an argument of?


1)
smaller than its actual
argument :____________
________________________________________
2)
larger than its actual argument
: _____________
_____________________________________

11

Two differences between value and ref.


1) ____________________________________
____________________________________
2) ____________________________________
____________________________________

12

How overloaded methods are


bonded_____________
____________________________________________
____________________________________________
Two qualities of a Class variable.
1. _____________________________________
2. _____________________________________
List four types of Method parameter
1) ___________________
2) ___________________
3) ___________________
4) ___________________

15

_______ & __________ access specifier can be


joined.
________ is use to refer a method inside own
class.

General syntax for declaring a non static


member.

16

C# Method can be defined only in class. YES


/ NO
Define method
________________________________
____________________________________________
Complete the following code snippets: class
test{
public static _____ add(int a, int b, ______
float )
{ string s = +a+b+c+100; return 100;
return ;;;;;;;;; int x = a+b+c+ (++c - --a);

13

14

17

Time 30 Min Total 30

Write a method that contains three return


statements

18

return +x
}}

What do you mean by local variable of


method in
C#________________________________________
__________________________________________
__________________________________________
__________________________________________

19

20

If a method is void AnyM(int a, float b,


double c) then
1) AnyM(10, 20.30, 40) can match YES /
NO
2) AnyM((int)20.30, 40, 50) can match
YES / NO
Underline the error: class test { int
imprivate = 100;
public double public_int(int a, int a) {return
00; }
public static void main(int x, int y) {return
imprivate;}}

Marks Obtained __________ in Words ___________________________ Signature of the


Examiner________
Remarks by the examiner ___________________________________________________________________

You might also like