Question
What is the output of this C code?
int main()
{
j = 10;
printf("%d\n", j++);
return 0;
}
int main()
{
j = 10;
printf("%d\n", j++);
return 0;
}
Answer: Option C
Was this answer helpful ?
Variable j is not defined.
Output:
$ cc pgm3.c
pgm3.c: In function 'main':
pgm3.c:4: error: 'j' undeclared (first use in this function)
pgm3.c:4: error: (Each undeclared identifier is reported only once
pgm3.c:4: error: for each function it appears in.)
Was this answer helpful ?
Submit Solution