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

What is the use of turbo c++?

0 Answers  


What is the use of class in c++?

0 Answers  


What is a constant? Explain with an example.

0 Answers  


Why do we learn c++?

0 Answers  


What is the use of ::(scope resolution operator)?

0 Answers  


When is a template better solution than a base class??

2 Answers   emc2,


What are the advantages of c++? Explain

0 Answers  


Can you write a function similar to printf()?

0 Answers  


Explain rethrowing exceptions with an example?

0 Answers  


Define whitespace in C++.

0 Answers   HCL,


Is there a new/delete equivalent of realloc?

1 Answers  


What do you mean by persistent and non persistent objects?

1 Answers  


Categories