#include <iostream> #include <cstdint> #include <cstdio> using namespace std; int main() { uint16_t ii; std::cin >> ii; printf("%d\n", ii); }
When I give input 5 , output is also 5 . But when I change type ii to uint8_t , I don't get 5 , but 53 , which seems to be an ASCII value of 5 . Is this expected?
c ++ c ++ 11 g ++ c ++ 14
gyro
source share