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

Discussion :: Control Instructions - c#

  1. Which of the following loop correctly prints the elements of the array?

    char[ ] arr = new char[ ] {'k', 'i','C', 'i','t'} ;

     

  2. A.
     do
     {   
           Console.WriteLine((char) i);  
     } 
      while (int i = 0; i 
    B.
    foreach (int i in arr) 
    {  
       Console.WriteLine((char) i); 
    }
    C.
     for (int i = 0; i char) i); 
     }

     

    D.
     while (int i = 0; i char) i); 
     }
    
    E.
     do
     {   
         Console.WriteLine((char) i);  
     }  
     until (int i = 0; i 

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment