placeholder image to represent content

C# Questions On For, While And If Else Statements

Quiz by Akzat Kauyssova

Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
10 questions
Show answers
  • Q1
    Which of the C# loops is not a pretest loop?
    while loop
    for loop
    do while loop
    loop
    20s
  • Q2
    The break command is used to exit a loop.
    False
    True
    no answer
    Both of them=)
    20s
  • Q3
    Which of the followings is not a nested loop?
    for(i=0;i<10;i++) Console.Write("i={0}",i); for(j=1;j<i+2;j++) Console.Write("j={0}",j);Console.Write("j={0}",j);
    for(i=0;i<10;i++) while(j%2!=0){ Console.Write("{0}\t{1}", j, j++);}
    for(i=0;i<10;i++) Console.Write("i={0}",i);
    for(i=0;i<10;i++) for(j=1;j<i+2;j++)
    30s
  • Q4
    Which of the following is not a logical operator in C# language?
    &
    &&
    !=
    ||
    10s
  • Q5
    The purpose of using a loop is to
    Repeat operation(s) many times
    make decision
    Repeat operation(s) three times
    Repeat operation(s) one time
    20s
  • Q6
    Which of the following is not a comparison operator in C# language?
    =
    >
    ==
    <=
    10s
  • Q7
    Which of the following statements about the while loop is not true?
    Testing condition is made before each iteration.
    The while loop is a posttest loop.
    The while loop statement must terminate with a semi-colon.
    20s
  • Q8
    There are two different ways to implement multi selections in C# language. They are
    switch and case
    if...else and switch case
    if...else and switch case
    else-if and case
    20s
  • Q9
    What Will Be The Output Of The Following Code Snippet:
    Question Image
    0 1 2 3 4 5
    1 2 3 4 5 6 7 8 9 10
    0 1 2 3 4 5 6
    0 1 2 3 4
    45s
  • Q10
    What Will Be The Output Of The Following Code Snippet:
    Question Image
    4 3 2 1 0
    2 3 4 1
    3 2 4 1
    4 3 2 1
    45s

Teachers give this quiz to your class