nkengafacnc nkengafacnc
  • 26-01-2020
  • Computers and Technology
contestada

How can I write an assignment statement that stores the character 'X' in a variable ch?

Respuesta :

l135134 l135134
  • 01-02-2020

Answer:

In C++ we can assign a character to the variable by using the below statement.

ch='X';

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.

Answer Link

Otras preguntas

which statement best defines energy ?​
From California to New York, legislative bodies across the United States are considering eliminating or reducing the surcharges that banks impose on noncustomer
hi!cvdbrtgbntfbvjvvfhbhc
Why is 100 4 tens and 14 tens
5.3g + 8 = 3.3g + 20
translate seven minus three times a number into an algebraic expression
What is the function of the sporangium? protects the mature gametes protects the developing mother spore cells forms haploid cells through mitosis passes charac
Marco is researching all the people who live in the city of Manhattan. What is the most accurate term for the group he is studying? A. demography B. populatio
In Anne Frank: The Diary of a Young Girl what page is she told she told she talks a lot? Very important for my essay and need an answer today!
Convert 5/8 to Decimal