0
C++ code
Could someone explain this c++ code? https://code.sololearn.com/cyURK7t9aHU0/#cpp
1 Resposta
+ 1
0xa is hexa decimal value of 10.
Stored in int a;
cout << hex <<a; //prints the values in hexadecimal format. So print a;
To look differents try this:
#include <iostream>
using namespace std;
int main() {
int a =0xa;
cout<<a;
cout << hex << a;
return 0;
}