home
Learn
screen_rotation
#include <stdio.h> #include <conio.h> void main(){ int arr[7]; int i; clrscr(); printf("\n This is 1-d array program."); for(i=0;i<7;i++){ printf("\n Enter value for arr[%d] = ",i); scanf("%d",&arr[i]); } for(i=0;i<7;i++){ printf("\n value of arr[%d] = %d",i,arr[i]); } getch(); }
Program Output
This is 1-d array program. Enter value for arr[0] = 10 Enter value for arr[1] = 20 Enter value for arr[2] = 30 Enter value for arr[3] = 40 Enter value for arr[4] = 50 Enter value for arr[5] = 60 Enter value for arr[6] = 70 value of arr[0] = 10 value of arr[1] = 20 value of arr[2] = 30 value of arr[3] = 40 value of arr[4] = 50 value of arr[5] = 60 value of arr[6] = 70