Answers for "what is a variable in cpp"

C++
11

c++ declare variable

std::string str = "text";	// stores a string
int    foo = 3;				// stores any integer
float  bar = 3.14;			// stores 32 bit number
double baz = 3.14159265;	// stores 64 bit number
Posted by: Guest on January-18-2020
1

what is a variable in cpp

Variable is simply a name or a label given to a memory location.
Posted by: Guest on October-06-2021
0

C++ variables

Create a variable called myNum of type int and assign it the value 15:
  int myNum = 15;
cout << myNum;
Posted by: Guest on May-07-2021

Browse Popular Code Answers by Language