logo

Courses with this lesson

Dereferencing in C

#include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char* argv[]) { int arr[] = { 5, 13, 22 }; printf("%d\n", arr[0]); printf("%d\n", arr[1]); printf("%d\n", 1[arr]); printf("%d\n", *arr); int a = 16; int *p = &a; *p = 17; // NOT: p = 17 printf("%d\n", *p); return 0; }