Hi Friends, I am new to C. I am trying to learn it, I got stuck some where in arrays. Please check following program
#include <stdio.h>
#include <stdlib.h>
int arr1[] = {10,20,30,40,50};
int arr2[] = {5,15,25,35,45};
int *main_arr[] = {arr1,arr2};
int main()
{
printf("in first array 0th locatin value is: %d\n",*main_arr[0]);
system("PAUSE");
return 0;
}
By using printf i can print the value at 0th location, but not getting how to access rest of the element ...please help me!