Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.51 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <conio.h>
  4. #include <iostream>
  5.  
  6. using namespace std;
  7.  
  8. char c;
  9.  
  10. int garbage_function()
  11. { char c;
  12.   cout << "press a key";
  13.   cin >> c;
  14. }
  15.  
  16.  
  17. int main()
  18. {
  19.   char c;
  20.   char str_a[20];
  21.   char *pointer;
  22.   char *pointer2;
  23.  
  24.   strcpy(str_a, "Hello World\n");
  25.   pointer = str_a;
  26.   printf(pointer);
  27.  
  28.   pointer2 = pointer + 2;
  29.   printf(pointer2);
  30.   strcpy(pointer2, "y you guys!\n");
  31.   printf(pointer);
  32.  
  33.   cout << "press a key to continue";
  34.   cin >> c;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement