The analogy
A variable is a house. A pointer is a piece of paper with the house address written on it. & reads the address. * walks to the house.
Five JNTU favourites
- Swap two numbers using pointers.
- Pointer arithmetic on arrays.
- Difference between
int *pandint **p. - Pass-by-value vs pass-by-reference.
- Dangling pointers and why
free()matters.
Code you should type, not copy
int a = 10;
int *p = &a;
printf("%d", *p); // 10
Honest advice
I failed my first internal on this. What fixed it was drawing boxes and arrows for every program. Do that for a week.
