ASCII code of null character is always zero .WE represent the ASCII Code by "/0".
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;
}