ExamVeda
Login
Home
This question belongs to C Program C Fundamentals
C Fundamentals
?

Find the output of the following program. void main() { int i=01289; printf("%d", i); }

Answer & Solution
Correct Answer: Option E

The prefix 0 in an integer value indicates octal value. In octal value use of 8 and 9 is not allowed and hence the error.

Examveda
Question posted by Examveda
Community

Join the Discussion

3 Comments
Narendra B
Narendra B 6 years ago
It maybe
Elizabeth Bathini
Elizabeth Bathini 6 years ago
How it is
Elizabeth Bathini
Elizabeth Bathini 6 years ago
It may be correct