how to use gets after scanf code example Example: how to use gets after scanf scanf("%d",num); int c=getchar(); gets(str);