#include <stdio.h>
int main() {
int num=0;
printf("Enter a number from 0-100:");
scanf("%d",&num);
/* think of scanf performing two tasks:
1) reads the raw input from the user, based on the format specifier (%d for integers)
2) Stores the user input at the memory address of the variable (provided by &num).
*/
printf("\nYou typed in %d %p\n",num,&num);
return 0;
}
/*
*The symbol table is meant to show how variables are represented in memory
*symbol table
symbol name, address, size
num 1000 4 bytes (32 bits)
1000 [0000 0000][0000 0000][0000 0000][0100 0001] [0000 0000][0000 0000][0000 0000][0000 0000]
1008 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1016 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1024 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1032 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1040 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1048 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1056 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
1064 [0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000][0000 0000]
*/
To embed this project on your website, copy the following code and paste it into your website's HTML: