How to write a C Program Array Index Example in C Programming Language ?
Solution For C Program :
//C Program Array Index Example
#include <stdio.h>
int main(){
int a[4] = {555, 666, 777, 888}, b[4];
printf("a: %d\n", a);
printf("b: %d\n", b);
printf("b-a: %d\n", b-a);
scanf("%d", &a[b-a]);
scanf("%d", &a[b-a+1]);
scanf("%d", &a[b-a+2]);
scanf("%d", &a[b-a+3]);
printf("%d\n", b[0]);
printf("%d\n", b[1]);
printf("%d\n", b[2]);
printf("%d\n", b[3]);
for( int i = 0 ; i < 20 ; i++ ){
printf("%d: %d\n", i, b[i]);
}
return 0;
}