age is an interger variable decleared and initialiise to hold a value of 20.give two ways you can archieve this in c++
Answers
Answered by
0
Answer:
gdisjebdnd☺
Explanation:
gxjdjsjsosjeusbdkdb dhdbdvdhdvdjbde8yehudhe
Answered by
0
Answer:
Method 1: // declaration and initialization in single line
int age = 20;
Method 2:
int age; // declaration
Age = 20; // initialization
Method 3:
Dynamic initialization:
#include <iostream.h>
void main()
{
int age;
cout<<”Enter age”;
cin>>age;
return;
}
In method one, the declaration and initialization is done in single line. In the second method, the declaration is done first and then the “age” variable gets initialized. In the third method, the value of “age” variable is set at the run time.
Similar questions
Social Sciences,
5 months ago
Math,
5 months ago
Math,
11 months ago
Social Sciences,
11 months ago
Math,
1 year ago
Computer Science,
1 year ago