0

Int x=035; int y=014; int c =a+b; what is the value of c

23rd Jan 2018, 4:26 PM
Pintu Sharma
Pintu Sharma - avatar
8 odpowiedzi
+ 21
/* here are some special notations for specifying the base*/ //might error will come bcz it will convert it to octal from decimal and int datatype will not be able to hold that large number https://code.sololearn.com/cFhPmtl1XAfT/?ref=app one more thing , u by mistakely wrote a,b in place of x,y & Int in place of int */ https://stackoverflow.com/questions/23039871/why-int-j-012-giving-output-10
23rd Jan 2018, 4:33 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
sorry in place of 038 use 035 mistake in writing
23rd Jan 2018, 4:38 PM
Pintu Sharma
Pintu Sharma - avatar
0
emm, what? its joke ?
23rd Jan 2018, 4:31 PM
rusich
rusich - avatar
0
no it's not a joke
23rd Jan 2018, 4:32 PM
Pintu Sharma
Pintu Sharma - avatar
0
answer is 41
23rd Jan 2018, 4:36 PM
Pintu Sharma
Pintu Sharma - avatar
0
okey, why x,y initialized from zero (038, 014) why a and b are not declared, and what means " what is the value of c" it's looks likr trolling, if you try compile it you get error...
23rd Jan 2018, 4:36 PM
rusich
rusich - avatar
0
0 is used before number because of 0 is used to represent the Octal number
23rd Jan 2018, 4:39 PM
Pintu Sharma
Pintu Sharma - avatar
- 1
Now i know about octal numbers... https://code.sololearn.com/cjIu9Fg5MwKG/?ref=app ps: correct the post, not c= a + b. c=x+y
23rd Jan 2018, 4:49 PM
rusich
rusich - avatar