Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main() {
- char userInput[100];
- char *ptr = userInput[0];
- int i;
- for(i = 0; i < 100; i++) {
- userInput[i] = NULL;
- }
- printf("Enter a string:\n");
- scanf("%[^\n]", userInput);
- for(i = 0; i < 100; i++) {
- printf("%p", *ptr);
- ptr++;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement