Printf MCQ 3 : Variable is Declared but Not Specified in Printf



Printf Multiple Choice Questions  : Variable is Declared but Not Specified in Printf


Predict the Output of the Following Program ?

  • Programs Compiled on Borland CC++ 3.0
#include<stdio.h>
void main()
{
int ivar = 10;
printf("%d%d");
}

Options :

  1. 0 0
  2. Compile Error : Undefined Symbol
  3. 10 0
  4. 0 10

[toggle title=”Output”]10 0[/toggle]


Switch to Printf MCQ Home :  Click Here


How and Why ?

  1. Undefined Behavior of Printf
  2. Click Here to See All Observation of Undefined Behavior