new

Home >> Sem 2 >> Data-structur >> new

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
 {
   int n,i, *p,*q;
   clrscr();

   printf("Howmany number that u want to store :  ");
   scanf("%d",&n);
    p = new int[n];
    q=p;
   printf("Enter %d Elements : \n",n);
   for(i=0;i<n;i++)
    {
     scanf("%d",p);
     p++;
   }

 printf("An array will Contains : ");
   for(i=0;i<n;i++)
    {
     printf("%d ",*q);
     q++;
    }


 getch();
 }