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
Write a short code using c++ to print out all odd number from 1 to 100 using a for loop
How to tokenize a string in c++?
What are the advantages of c++ over c?
What is difference between class and function?
What is an operator function? Describe the function of an operator function?
why is c++ called oops? Explain
Explain rethrowing exceptions with an example?
What are the characteristics of friend functions?
what is data encapsulation in C++?
Does c++ vector allocate memory?
Are strings mutable in c++?
Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement
Explain the use of virtual destructor?
How can we access protected and private members of a class?
Can malloc be used in c++?