Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (anonymous):

#include #include void main() { int i=011; printf("%d",i); getch(); } what is the output of this question with explanation...

OpenStudy (anonymous):

in c the integer constatnt which begins with Zero is an octal number. if you are printing as an integer than it will first convert into decimal than that decmal will be value of that integer. In your program integer constatnt is 011 it first convert into decimal number that is 9. so the output is 9.

OpenStudy (anonymous):

thanks...

OpenStudy (anonymous):

therefore it gives error when we use this code i=092 because this is not octal number...

OpenStudy (anonymous):

yes you are wright taufique.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!