ASCII code of null character is always zero .WE represent the ASCII Code by "/0".View more random threads:
- forward declaration instead of header files in c++ 2011
- what is the function of ostream in c++ 2011
- difference of cin and cout statemenet,i have no computer...
- Function (Retrun push)for what purpose use in the program. ?
- Subject: Dev c++
- Vector of stucts in c++ 2011-12
- Boolean data problem in c++ 2011-12
- comkplie karta hn to wo save hony k liye location deta hy...
- how can identify interface for an object
- which situation we use stack.h and why we use stack.cpp
All string are terminated with null character. its Means ASCII code are use to terminate a string
#include <iostream>
using namespace std;
Sponsored Links
Code:int main(){ char ascii; int numeric; cout << "Give character: "; cin >> ascii; cout << "Its ascii value is: " << (int) ascii << endl; cout << "Give a number to convert to ascii: "; cin >> numeric; cout << "The ascii value of " << numeric << " is " << (char) numeric; return 0; }
There are currently 1 users browsing this thread. (0 members and 1 guests)