Guest User

Untitled

a guest
Apr 25th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include<assert.h>
  3. int main()
  4. {
  5.     printf("Enter stats ex: 100 matt 100 guzzo\n");
  6.     int num1;
  7.     char *name;
  8.     name = (char*)malloc(sizeof(char));
  9.     assert(name);
  10.     int num2;
  11.     char *lname;
  12.     lname = (char*)malloc(sizeof(char));
  13.     assert(lname);
  14.     scanf("%d %s %d%s",&num1, name, &num2, lname);
  15.     printf("%d\n",num1);
  16.     printf("%d\n",num2);
  17.     printf("%s\n",name);
  18.     printf("%s\n",lname);
  19.     printf("%p\n",lname);
  20.     printf("%p\n",name);
  21.     free(name);
  22.     free(lname);
  23.     return 0;
  24. }
Add Comment
Please, Sign In to add comment