C# Questions online Test

1.

What does the following C#.NET code snippet will print?

int i = 0, j = 0;

label:

i++;

j+=i;

if (i < 10)

{

Console.Write(i +" ");

goto label;

}


2.

Which of the following is the correct output for the C#.NET program given below?

int i = 20 ;

for( ; ; )

{

Console.Write(i + " ");

if (i >= -10)

i -= 4;

else

break;

}


3.

Which of the following statements is correct?


4.

What will be the output of the C#.NET code snippet given below?

int val;

for (val = -5; val <= 5; val++)

{

switch (val)

{

case 0:

Console.Write ("India");

break;

}

if (val > 0)

Console.Write ("B");

else if (val < 0)

Console.Write ("X");

}


5.Which of the following can be used to terminate a while loop and transfer control outside the loop?

1. exit while

2. continue

3. exit statement

4. break

5. goto


6.

The C#.NET code snippet given below generates ____ numbers series as output?

int i = 1, j = 1, val;

while (i < 25)

{

Console.Write(j + " ");

val = i + j;

j = i;

i = val;

}






































































Description:

Select correct option for each questions.Each questions has 4 options.Its fully based on C# programming and basic of DOTNET.
It has no time limits.DOTNET,C#,ASP.NET,VB>NET.You can review the answers after attending the test.Do Well All the best.
Select correct option for each questions.Each questions has 4 options.Its fully based on C# programming and basic of DOTNET.
It has no time limits.DOTNET,C#,ASP.NET,VB>NET.You can review the answers after attending the test.Do Well All the best.

Comments

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no:


Area code Number
Subjects you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy
1 Follower
Test: 1

Your Facebook Friends on WizIQ

Give live classes, create & sell online courses

Try it free Plans & Pricing

Connect