can output 5 students using one dimensional array



can output 5 students using one dimensional array..

Answer / hari haran

#include<iostream.h>
void main()
{
int a[5];
for(int i=0;i<n;i++)
{
cin>>a[i];
}
for(int i=0;i<n;i++)
{
cout<<"
"<<a[i];
}
}

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C++ General Interview Questions

Difference between declaration and definition of a variable.

0 Answers  


What do you mean by early binding?

0 Answers  


What are the two types of comments, and how do they differ?

0 Answers  


Explain virtual class?

0 Answers  


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

0 Answers  


Which c++ compiler is best?

0 Answers  


what is the order of initialization for data?

10 Answers   Amazon, TCS, Wipro,


What is the protected keyword used for?

0 Answers  


What is the Maximum Size that an Array can hold?

55 Answers   Adobe, FutureSoft, HCL, Infosys, Satyam, TCS, Wipro,


What is doubly linked list in c++?

0 Answers  


Which programming language is best to learn first?

0 Answers  


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

0 Answers  


Categories