Im new to the C programming language. I have a pointer array with 2 elements. I want to print the values inside the array. The code I have written
#include<stdio.h>
int main ()
{
int *bae[] = {10,12};
int i;
for(i=0;i<2;i++) {
printf("%d",*bae[i]);
}
return 0;
}
When I run this code it gave me warning like:
warning: (near initialization for 'bae[0]') [enabled by default]
warning: initialization makes pointer from integer without a cast [enabled by default]
warning: (near initialization for 'bae[1]') [enabled by default]
Hope you could help me in finding the solution