Next character printing by using static cast and goto statement in C Plus language.
Next character printing by using static cast and Goto statement:
C Plus Plus code:
// Print next Chracter using Static cast
#include<iostream>
using namespace std;
void main()
{
char value;
int a;
c:
cout << "enter any chracter = ";
cin >> value;
a=static_cast<int>(value);
a = a+1;
cout << "Next Chracter is = " << static_cast<char>(a)<<endl;
goto c;
}
Download this Code:
Click on the given link below:
Comments
Post a Comment