darraghd493

Basic Hello World

Jul 28th, 2022
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <Windows.h>
  3.  
  4. int main() {
  5.     char *name;
  6.  
  7.     printf("Hello there!\nWhat is your name? ");
  8.     scanf("%s", &name);
  9.     printf("Well thanks for telling me, %s!\n", &name);
  10.     Sleep(1000);
  11.     printf("Goodbye, %s!\n", &name);
  12.    
  13.     free(name);
  14.     Sleep(500);
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment