Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include<assert.h>
- int main()
- {
- printf("Enter stats ex: 100 matt 100 guzzo\n");
- int num1;
- char *name;
- name = (char*)malloc(sizeof(char));
- assert(name);
- int num2;
- char *lname;
- lname = (char*)malloc(sizeof(char));
- assert(lname);
- scanf("%d %s %d%s",&num1, name, &num2, lname);
- printf("%d\n",num1);
- printf("%d\n",num2);
- printf("%s\n",name);
- printf("%s\n",lname);
- printf("%p\n",lname);
- printf("%p\n",name);
- free(name);
- free(lname);
- return 0;
- }
Add Comment
Please, Sign In to add comment