#include<stdio.h>
main()
{
   int *p, n, i;
   printf("Enter no. of subjects : ");
   scanf("%d", &n);
   p = (int*) malloc(n*4);
   for(i=0; i<n; i++)
   {
     printf("Enter marks of subject %d : ", i+1);
     scanf("%d", (p+i));
   }
   for(i=0; i<n; i++)
     printf("Marks %d = %d \n", i+1,*(p+i));
   free(p);
   system("pause");   
}
