0

Just from my curiosity in a c++ code i took character input in an integer variable then printed the value. The output of the variable is 0 .But i was expecting to see an ASCII value like 65 or something else. What is the reason behind this ? I used code::blocks to run this code .

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int x;
    cin>>x;
    cout<<x;
}

0 Answers0