C gets code example
Example: gets syntax
#include <stdio.h>
#define MAX 15
int main()
{
char buf[MAX];
printf("Enter a string: ");
gets(buf);
printf("string is: %s\n", buf);
return 0;
}
#include <stdio.h>
#define MAX 15
int main()
{
char buf[MAX];
printf("Enter a string: ");
gets(buf);
printf("string is: %s\n", buf);
return 0;
}