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

Where the memory to the static variables is allocated?

0 Answers  


Write a program to interchange 2 variables without using the third one.

0 Answers  


Can you explain the term "resource acquisition is initialization?"

1 Answers   Amazon,


What is the extension of c++?

0 Answers  


Write a program to find the Factorial of a number

0 Answers  






Please explain the reference variable in c++?

0 Answers  


Write a program in C++ for Fibonacci series

0 Answers   Axtria, ITC Indian Tobacco Company,


What is the use of setfill in c++?

0 Answers  


What is new in c++?

0 Answers  


Name some pure object oriented languages?

1 Answers  


Describe the process of creation and destruction of a derived class object?

0 Answers  


int *p = NULL; printf("%1d",p) ; what will be the output of this above code?

3 Answers   Microsoft,


Categories