Computer Science, asked by nemlinvernon11, 11 months ago


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 bikram48
0

Answer:

gdisjebdnd☺

Explanation:

gxjdjsjsosjeusbdkdb dhdbdvdhdvdjbde8yehudhe

Answered by hotelcalifornia
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