0
How the output will be equals to 28?
#include <iostream> using namespace std; int main() { int x=034; cout<<x; }
1 Resposta
+ 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.