can output 5 students using one dimensional array

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept of dynamic allocation of memory?

619


What does ctime() do?

619


Is oops and c++ same?

580


Is nan a c++?

616


What is struct c++?

574






What is a breakpoint?

563


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2073


Is it possible for a member function to use delete this?

576


What are friend functions in C++?

626


What are the advantages of using pointers in a program?

684


Why do we learn c++?

534


What are the two types of comments?

579


What are the differences between new and malloc?

633


What are the various operations performed on stack?

634


What is srand c++?

585