Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

initialisation of a c++ variable

//<Data type> <variable name>;
//static initialisation:
int acceleration=4;
//alternative:
int acceleration;
acceleration=4;
//dynamic initialisation:
int acceleration;
std::cout<<"Enter the value of the acceleration
";
std::cin>>acceleration;
 
PREVIOUS NEXT
Tagged: #initialisation #variable
ADD COMMENT
Topic
Name
7+7 =