Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- typedef struct waffle
- {
- char *name;
- } waffle;
- waffle *scan(int *number);
- int main(void)
- {
- waffle nom;
- int count=0;
- nom = scan(&count);
- printf("count is :%d", count);
- return 0;
- }
- waffle *scan(int *number)
- {
- int i;
- waffle *syrup;
- char *buff;
- for (i = 0; i <5; i++)
- {
- printf("Name first waffle:\n>");
- scanf("%s", buff);
- syrup[i].name = (char*) calloc( strlen(buff+1), sizeof(char) );
- }
- return syrup;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement