Description:
Understand pointers — address and value.
Understand pointers — address and value.
C Code
#include <stdio.h>
int main() {
int x = 42;
int *ptr = &x;
printf("Value: %d\n", *ptr);
*ptr = 100;
printf("After change: %d\n", x);
return 0;
}
Expected Output
Value: 42
After change: 100