I found the following code on internet for adding two numbers using pointers:-
#include<stdio.h>
int main()
{
int a=30000,b=20,sum;
char *p;
p=(char *)a;
sum= (int)&p[b];
printf("%d",sum);
return 0;
}
But I can't understand how p holds the value 30000 or how the result of the program is addition of 30000 and 20..
And another small question.. What does the following statement declare:
char *a[][40];
What does '40' signify in this? Please help me out!!