Home / C# Programming / Control Instructions - c# :: Discussion

Discussion :: Control Instructions - c#

  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. A.

    Prints 1 to 9

    B.

    Prints 0 to 8

    C.

    Prints 2 to 8

    D.

    Prints 2 to 9

    E.

    Compile error at label:.

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    No answer description available for this question.


Be The First To Comment