fgets() and puts() function in c language

www.laut‮rut‬i.com
fgets() and puts() function in c language

The functionfgets() is used to read a string
The function puts() is used to display a string into standard output.

#include <stdio.h>
int main()
{
    char name[20];
    printf("Enter name: ");
    fgets(name, sizeof(name), stdin);  // read string
    printf("Name: ");
    puts(name);    // display string
    return 0;
}
Created Time:2017-08-28 05:45:37  Author:lautturi