fgets() function in C Language


O LEVEL -PAPER 3rD -- M3-R4

C  LANGUAGE 


fgets() function in C


The fgets function reads a sequence of character, i. e., a character string from an input stream. Its prototype is given below.



fgets in c,fgets function in c
fgets function in c



Syntax of fgets() function



fgets( str,n,fp);


The fgets() function takes three arguments, first is the string read from the file, second is size of string(character array) and third is the file pointer from where the string will be read.


EXAMPLE :--



fgets in c,fgets function in c
fgets function in c


Comments

Popular posts from this blog

Notepad, Wordpad and Paint

HOW TO PASS CCC EXAM WITH ONE ATTEMPT (NIELIT)

Inheritance in C++ Language(part 1)