Multiple choice

Find out the error in the following program. void main() { int t,c; scanf(Enter the values of t and c = %d %d,&t,&c); printf(t=%d c=%d, t, c); }

  1. Compile error

  2. Linker error

  3. No error

  4. Runtime error

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

It runs properly if the message is to be typed as it is in the scanf() statement, and then enter the values of t and c. For example, After running the program: Enter the values of t and c = 45 67 The output will be t = 45 c = 67