Tag Archives: array problem
array assignment problem
#include #define size 4 int main (void) { int val1=44; int arr[size]; int val2=88; int i; printf(“value1 = %d,value2= %d\n”,val1,val2); for(i=-1;i<=size;i++) arr[i]=2*i+1; printf("value1 =%d,value2=%d\n",val1,val2); for(i=-1;i<7;i++) printf("%2d %d\n",i , arr[i]); printf("value1 =%d,value2=%d\n",val1,val2); printf("value1 =%d,value2=%d\n",val1,val2); return 0; } value1 = 44,value2= 88 … Continue reading