#include <stdio.h> int main() { int marks[4]; int *ptr; ptr = &marks[0]; int i; for(i=0;i<4;i++){ printf("enter the value of the marks: %d\n" , i+1); scanf("%d" , ptr); ptr++; } for(i=0;i<4;i++){ printf(" the value of the marks %d is :%d\n" , i+1 , marks[i]); } //code return 0; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter