A 1, 2
B 2, 3
C 3, 4
D 4, 5
E None of these

A 1, 3, 5
B 3, 4, 5
C 2, 5
D 4, 5
E None of these

# Q3: If a function fun() is to sometimes receive an int and sometimes a double then which of the following is the correct way of defining this function?

A
``````static void fun(object i)
{ ... }``````
B
``````static void fun(int i)
{ ... }``````
C
``````static void fun(double i, int j)
{ ... }``````
D
``````static void fun(int i, double j)
{ ... }``````
E
``````static void fun(int i, double j, )
{ ... }``````

# Q4: How many values is a function capable of returning?

A 1
B 0
C Depends upon how many params arguments does it use.
D Any number of values.
E Depends upon how many ref arguments does it use.

# Q5: If a procedure fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this procedure?

A
``````fun(int i, Single j, double k) decimal
{ ... }``````
B
``````static decimal fun(int i, Single j, double k)
{ ... }``````
C
``````fun(int i, Single j, double k)
{
...
return decimal;
}``````
D
``````static decimal fun(int i, Single j, double k) decimal
{ ... }``````
E A procedure can never return a value.

# Q6:What will be the output of the C#.NET code snippet given below? ``````namespace AptitudeCrackConsoleApplication { class SampleProgram { static void Main(string[] args) { int[]arr = newint[]{ 1, 2, 3, 4, 5 }; fun(ref arr); } static void fun(ref int[] a) { for (int i = 0; i < a.Length; i++) { a[i] = a[i] * 5; Console.Write(a[ i ] + ' '); } } } }``````

A 1 2 3 4 5
B 6 7 8 9 10
C 5 10 15 20 25
D 5 25 125 625 3125
E 6 12 18 24 30

# Q7:Which of the following will be the correct output for the C#.NET program given below? ``````namespace AptitudeCrackConsoleApplication { class SampleProgram { static void Main(string[] args) { int num = 1; funcv(num); Console.Write(num + ', '); funcr(ref num); Console.Write(num + ', '); } static void funcv(int num) { num = num + 10; Console.Write(num + ', '); } static void funcr (ref int num) { num = num + 10; Console.Write(num + ', '); } } }``````

A 1, 1, 1, 1,
B 11, 1, 11, 11,
C 11, 11, 11, 11,
D 11, 11, 21, 11,
E 11, 11, 21, 21,

A 1, 3
B 2, 4
C 4, 5
D 1, 5
E None of these

# Q9:What will be the output of the C#.NET code snippet given below? ``````namespace AptitudeCrackConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i = 10; double d = 34.340; fun(i); fun(d); } static void fun(double d) { Console.WriteLine(d + ' '); } } }``````

A 10.000000 34.340000
B 10 34
C 10 34.340
D 10 34.34

# Q10: If a function fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this function?

A
``````decimal static fun(int i, Single j, double k)
{ ... }``````
B
``````decimal static fun(int i, Single j, double k)
{ ... }``````
C
``````static decimal fun(int i, Single j, double k)
{ ... }``````
D
``````static decimal fun(int i, Single j, double k) decimal
{ ... }``````
E
``````static fun(int i, Single j, double k)
{
...
return decimal;
}``````

A 1 4.0 India B
B 1 4.0 India
C 1 4 India
D 1 India B

# Q12:Which of the following will be the correct output for the C#.NET program given below? ``````namespace AptitudeCrackConsoleApplication { class SampleProgram { static void Main(string[] args) { int a = 5; int s = 0, c = 0; Proc(a, ref s, ref c); Console.WriteLine(s + ' ' + c); } static void Proc(int x, ref int ss, ref int cc) { ss = x * x; cc = x * x * x; } } }``````

A 0 0
B 25 25
C 125 125
D 25 125
E None of the above

A 1
B 7
C 8
D 720
E 5040

A True
B False

A 1, 2, 3
B 2, 3, 5
C 3, 5
D 3, 4
E None of these

A 1, 2, 4
B 2, 3, 5
C 3, 5
D 4, 5
E None of these

A 1, 2, 5
B 2, 3, 5
C 2, 3
D 4, 5
E None of these

A 5, 6
B 5, 36
C 25, 36
D 25, 0
E 5, 0

A namespace
B Entrypoint
C Class
D Function
E Subroutine

A True
B False

# Q21: How many values is a subroutine capable of returning?

A Depends upon how many params arguments does it use.
B Any number of values.
C Depends upon how many ref arguments does it use.
D 0
E 1

## For help Students Orientation Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.