write a program to insert an element into an array
Answer Posted / saranya
#include<iostream.h>
#include<conio.h>
void main()
{
int a[5],i;
clrscr();
cout<<"enter the element to be inserted into an array";
for(i=0;i<5;i++)
{
cin>>a[i];
}
for(i=0;i<5;i++)
{
cout<<a[i];
}
getch();
}
Is This Answer Correct ? | 21 Yes | 50 No |
Post New Answer View All Answers
Why is c++ awesome?
What is stoi in c++?
What is class invariant in c++?
Write a program which is required to process the time of a clock in hours and minutes, entered from the keyboard. With this program, there are two requirements for any data entered by a user: 1. The data must be of the correct type (in this case, two ints). 2. The data must be in the correct range: this means that, for the minutes, negative numbers and any number above 59 must be rejected; for the hours, negative numbers and any number above 23 must be rejected. Output error message for invalid data input. Output the time one and a half hour after the time input. i.e. Hour: 22 Min: 32 One and a half hour after 22:32 is 00:02
What is a class definition?
What is the standard template library (stl)?
What are pointer-to-members? Explain.
What is math h in c++?
What are guid?
How can an improvement in the quality of software be done by try/catch/throw?
How much maximum can you allocate in a single call to malloc()?
Are vectors faster than arrays?
What does ios :: app do in c++?
What is static class data?
Explain the auto storage classes in c++.