Enter the data string with spaces [C]
After a long search ... See also how. enter the data string with spaces by using the function gets. This gets to read 1 line, so different from scanf.
This is the code :
#include<stdio.h>
#include<conio.h>
void main()
{
char nama[20];
printf("Input name : ");
gets(nama); //untuk membaca line menggunakan gets
printf("\n%s",nama);
getch();
}
Hopefully can help :)
Subscribe to:
Post Comments (Atom)
ABOUT ME
Albert Julius. Powered by Blogger.
0 comments:
Post a Comment