write a program to insert an element into an array
Answer Posted / gokul balaji
#include<iostream.h>
#include<conio.h>
void main()
{
int a[5],i;
for(i=0;i<5;i++)
{
cin>>a[i];
}
for(i=0;i<5;i++)
{
cout<<a[i];
}
}
| Is This Answer Correct ? | 15 Yes | 66 No |
Post New Answer View All Answers
How do we balance an AVL Tree in C++?
Why iomanip is used in c++?
What are stacks? Give an example where they are useful.
What's the most powerful programming language?
What is the use of cmath in c++?
What is a c++ object?
What is the return value of the insertion operator?
What is the meaning of c++?
What is the use of c++ programming language in real life?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include What are the benefits of operator overloading? What are the advantages of early binding? What is the array and initializing arrays in c++? What is constructor and destructor in c++? Does improper inheritance have a potential to wreck a project?