ASCII VAlues

/*This program will demonstrate how to use characters as Acii Value integers
and use integers as characters.*/
#include <iostream.h>
main()
{
int k;
char ch3;
char stg[4];

int x =65;
int y = 'C';
cout << x << "***" << y << '\n';
char ch = 'B';
char ch2 = 68;
cout << ch << "***" << ch2 << '\n';

k = 'D' + 4 + y; // 68 + 4 + 67

cout << k << '\n';

stg[0] = 65; // placing the first character in the string.
stg[1] = 'K'; // placing the second character in the string.
stg[2] = y; // placing the thrid character in the string.
stg[3] = '\0'; // placing the null character at the end of the string.
cout << stg[0] << "***" << stg;

return 0;
}
/*
65***67
B***D
139
A***AKC
*/