0

How the output will be equals to 28?

#include <iostream> using namespace std; int main() { int x=034; cout<<x; }

4th Aug 2017, 3:26 AM
Deepak Handke
Deepak Handke - avatar
1 Answer
+ 12
When a variable is assigned a value there are several symbols to be used to define the base of the number. e.g: int x = 034 // <- zero lead number meaning octal (base 8) int x = 0x20 // <- zero and x meaning hexadecimal (base 16) Hth, cmiiw.
4th Aug 2017, 3:37 AM
Ipang