Program to enter the elements of array

#include #include main() { int a[20],i,n; clrscr(); cout<>n; cout<<"n Enter the element:n"; for(i=0;i<n;i++) { cout<<"n A["<<i<>a[i]; } cout<<"nnn"; cout<<"n Entered elemment of array were:"; for(i=0;i<n;i++) { cout<<"n A["<<i<<"]="<<a[i]; } getch();…

0 Comments

To show the concept of new and delete operator.

#include #include main() { int*pi=new int; float*pf=new float; char*pc=new char; clrscr(); cout<"; cin>>*pi; cout<"; cin>>*pc; cout<"; cin>>*pf; cout<"<<*pi; cout<"<<*pc; cout<"<<*pf; getch(); delete pi; delete pf; delete pc; }

0 Comments