Answer:
In C++ we can assign a character to the variable by using the below statement.
ch='X';
Step-by-step explanation:
The complete program for assigning a character to the variable is given as
#include<iostream>
#include <conio.h>
using namespace std;
main()
{
char ch;
ch= 'X';
cout<<"output of variable Ch ="<<ch;
getch();
}
In above program Char is the data type used for character type variables. ch= 'X' stores X in ch. Then output will shown through cout.