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

wap to accept 10 numbers & display the number of odd and even numbers??

1 Answers  


why we cant create array of refrences

4 Answers  


Enter n no. of element and delete value from desire position

1 Answers  


Is c++ an oop?

0 Answers  


How do we implement inheritance in c++?

0 Answers  






Define Virtual function in C++.

0 Answers   iNautix,


What is conversion constructor?

2 Answers   TCS,


What are the various oops concepts in c++?

0 Answers  


Difference between overloaded functions and overridden functions

0 Answers  


Explain abstraction.

0 Answers  


Can I learn c++ without learning c?

0 Answers  


What are proxy objects?

2 Answers  


Categories