You are on page 1of 1

#include<stdio.

h>
#include<conio.h>
#include<stdlib.h>
void main()
{
int a[10],*ptr,i,n;
clrscr();
printf("\n Enter no. of array ");
scanf("%d",&n);
ptr=(int*)malloc(n*sizeof(int));
printf("\n Enter elements of array");
for(i=0; i<n; i++)
{
scanf("%d",&a[i]);
}
printf("\n The entered elements are :");
for(i=0; i<n; i++)
{
printf("\n%d",a[i]);
}
printf("\n Job done!!!");
free(ptr);
getch();
}

You might also like