Skip to content

Instantly share code, notes, and snippets.

@YohanesGetinet1
Forked from Impermenance-2021/Pointer.c
Last active August 14, 2021 05:58
Show Gist options
  • Save YohanesGetinet1/1d767846e12c123097e5228d10fda423 to your computer and use it in GitHub Desktop.
Save YohanesGetinet1/1d767846e12c123097e5228d10fda423 to your computer and use it in GitHub Desktop.
Day_0. Practice Code - Demonstration of Pointers
#include <stdio.h>
int main()
{
int num = 10;
int * ptr;
/* Stores the address of num to pointer type */
ptr = &num;
printf("Address of num = %d\n", &num);
printf("Value of num = %d\n", num);
printf("Address of ptr = %d\n", ....);
printf("Value of ptr = %d\n", ....);
printf("Value pointed by ptr = %d\n", ....);
/* Good way of learning */
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment