Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void){
- int num = 90;
- int *pnum = #
- printf("%d \n", num); // cup (coffee)
- printf("%d \n", *pnum); // point to address (coffee)
- printf("%p \n", &num); // address of cup
- printf("%p \n", pnum); //cup (address of cup)
- printf("============ \n");
- char *grade = "A+"; // address of 'A' (0xbf83c4e4)
- printf("%s \n", grade); // cup (converting the first address to string)
- printf("%p \n", grade); // cup (the first address of string)
- printf("%c \n", *grade); // point to the value of the first address (c)
- printf("%d \n", *grade); // point to the value of the first address (d)
- printf("== Insert Number =======>> \n");
- int num1;
- scanf("%d", &num1);
- printf("%d \n", num1);
- printf("== Insert any Words =======>> \n");
- char *str;
- scanf("%s", str);
- printf("%s \n", str);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment