Home / C Programming / Control Instructions :: Discussion

Discussion :: Control Instructions

  1. Which of the following statements are correct about the below C-program?

    #include<stdio.h> int main() {     int x = 10, y = 100%90, i;     for(i=1; i<10; i++)     if(x != y);         printf("x = %d y = %d\n", x, y);     return 0; } 
    1 : The printf() function is called 10 times.
    2 : The program will produce the output x = 10 y = 10
    3 : The ; after the if(x!=y) will NOT produce an error.
    4 : The program will not produce output.

  2. A.
    1
    B.
    2, 3
    C.
    3, 4
    D.
    4

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment