Machine-translated by Google. Questions are authored in English.
Top

Discussion

What is the output of this C code?

int main()

    {

        printf("before continue ");

        continue;

        printf("after continue\n");

    }

 

  • A.Before continue after continue
  • B.Before continue
  • C.after continue
  • D.Compile time error

Answer: D

Correct answer: Compile time error

continue must appear inside a loop. In a function body with no loop around it there is no next iteration to jump to, so the compiler rejects the program - neither printf ever runs.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.