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

::::::::::::::: c program ::::::::::::::: #include void main() { int i=-0777; printf("%d",i); } explain why the output comes -551

OpenStudy (anonymous):

decimal value of 777 is 511 how outcome is 551 can any one xplain clearly

OpenStudy (anonymous):

#include<stdio.h> int main() { float i=1.0f,j=0.05f; do { printf("%.2f",i++ - ++j); }while(i<2.0 && j<=2.0); return 0; }

OpenStudy (anonymous):

http://www.wolframalpha.com/input/?i=octral+-777+as+decimal Somehow c is interpretting -0777 as an octal? Perhaps due to the leading 0.

OpenStudy (espex):

@wio is correct, to represent a hexadecimal value in your C or C++ code, you precede the number with a 0.

OpenStudy (rsmith6559):

Octal has a leading zero. Hex is 0x.

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!