# C/C Sample Test,Sample questions

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

1. Depends upon how many params arguments does it use.

2.Any number of values.

3.Depends upon how many ref arguments does it use.

4.0

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

1.1

2.0

3.Depends upon how many params arguments does it use.

4.Any number of values.

## Question: ```What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { 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 + " "); } } }```

1.10.000000 34.340000

2.10 34

3.10 34.340

4. 10 34.34

1. 5, 6

2.5, 36

3. 25, 36

4. 25, 0

1.1

2.7

3.8

4.5040

1.1 4.0 India B

2.1 4.0 India

3. 1 4 India

4. 1 India B

## Question: ```What will be the output of the C#.NET code snippet given below? namespace IndiabixConsoleApplication { 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 ] + " "); } } } }```

1. 1 2 3 4 5

2.6 7 8 9 10

3.5 10 15 20 25

4.5 25 125 625 3125

1.namespace

2.Entrypoint

3.Class

4.Function

1.1, 2, 4

2.2, 3, 5

3.3, 5

4. 4, 5

1.1, 2, 5

2. 2, 3, 5

3.2, 3

4.4, 5

1.1, 2, 3

2.2, 3, 5

3.3, 5

4.3, 4

1.1,2

2.2,3

3.3,4

4.4,5

1.1, 3, 5

2.3, 4, 5

3.2, 5

4.4, 5

1. 0 0

2.25 25

3.125 125

4.25 125

## Question: `Which of the following will be the correct output for the C#.NET program given below? namespace IndiabixConsoleApplication { 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 + "", ""); } } }`

1.1, 1, 1, 1,

2.11, 1, 11, 11,

3.11, 11, 11, 11,

4.11, 11, 21, 11,

## More MCQS

##### R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!