Back To C Single Dimensional Arrays Index
//program to input integer array of size 5 using while loop and then display the integer array using while loop #include
#include
void main() { int marks[5]; int i=0; clrscr(); while(i<5) { printf("enter marks in subject %d",i+1); scanf("%d",&marks[i]); i++; } printf("\ndisplaying marks\n"); i=0; while(i<5) { printf("\nmarks in subject %d are %d",i+1,marks[i]); i++; } getch(); }