I have the following code:
#include <stdio.h>
#include <stdlib.h>
int *p;
int main() {
int a = 4, b = 8;
p = &b;
//TODO: fill in the blank
printf("a = %ld\n", /*Fill in here */);
printf("b = %ld\n", /*Fill in here */);
return 0;
}
How can I print the value of 2 variables a
and b
using only p
to access them?