Examveda
Examveda

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

A. 0289

B. 1289

C. 713

D. 0713

E. Syntax error

Answer: Option E

Solution(By Examveda Team)

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.


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Comments ( 3 )

  1. Narendra B
    Narendra B :
    3 years ago

    It maybe

  2. Elizabeth Bathini
    Elizabeth Bathini :
    4 years ago

    How it is

  3. Elizabeth Bathini
    Elizabeth Bathini :
    4 years ago

    It may be correct

Related Questions on C Fundamentals