print markes using Arry in c

 #include<stdio.h>

int main()

{

   int markes[4],i;

   int *ptr;

   ptr = &markes[0];

   

   for(i=0;i<4;i++){

   printf("Enter the value of markes for student %d:\n",i+1);

   scanf("%d",ptr);

   ptr++;

   }

   

   for(i=0;i<4;i++){

   printf("The value of markes for student %d is %d \n",i+1,markes[i]);

   }

   

return 0;

}

Comments

Popular posts from this blog

create a num table in a new file in c

write a programme to compare time stamp in c

write a struct programme to keep bank details in c