-->

WAP to understand character variable and constant.

//program to understand character variable and constant
#include <iostream>     //header file

using namespace std;//to handle all standard characters/functions,reserved words  used in program. we do not use in turboc++ compiler.
int main()          //main function
{
    char a='r';        //declaration and value assignment(initialization). We put inside single quote.
    cout << "character="<<a << endl;//value printing
    return 0;
}

No comments:

Post a Comment