Puts() Function In C Language With Example
Maybe your like
Home » C programs » C stdio.h library functions programs
puts() function in C language with ExampleHere, we are going to learn about the puts() function of library function stdio.h in C language with its syntax, example. Submitted by Souvik Saha, on February 22, 2019
puts() function in C
The puts() function is defined in the <stdio.h> header file.
Prototype:
int puts(const char *string);Parameters: const char *string
Return type: int
Use of function:
Through the puts() function, we write the string to the output stream stdout which are stored into the character array until it encounters the newline character. The prototype of the function puts() is int puts(const char *string);
Here string is the array of characters which are written to the stream. It returns a non-negative value for the successful operation and EOF for failure.
puts() example in C
#include <stdio.h> int main() { char ch[100]; printf("Enter any string\n"); //get the string gets(ch); printf("\nThe string is - "); //print the string puts(ch); return 0; }Output
C stdio.h Library Functions Programs »
gets() function of stdio.h in C putc() function of stdio.h in CRelated Programs
- printf() function in C language with Example
- perror() function of stdio.h in C
- puts() and putchar() functions of stdio.h in C
- gets() function of stdio.h in C
- putc() function of stdio.h in C
- fgets() function of stdio.h in C
- fscanf() function of stdio.h in C
- fopen() function in C language with Example
- freopen() function in C language with Example
- fclose() function in C language with Example
- feof() function in C language with Example
- ferror() function in C language with Example
- fgetc() function in C language with Example
- putc function in C language with Example
- fputc function in C language with Example
- fflush() function in C language with Example
- fgetpos() function in C language with Example
- fprintf() function in C language with Example
- fputs() function in C language with Example
- fread() function in C language with Example
- fseek() function in C language with Example
- fsetpos() function in C language with Example
- ftell() function in C language with Example
- fwrite() function in C language with Example
- getc() function in C language with Example
- snprintf() function in C language with Example
- getchar() function in C language with Example
- putchar() function in C language with Example
- remove() function in C language with Example
- rename() function in C language with Example
- rewind() function in C language with Example
Comments and Discussions!
Load comments ↻
Tag » What Is Puts In C
-
Using The Puts() Function In C/C++ - DigitalOcean
-
What Is Puts In C?
-
C Library Function - Puts() - Tutorialspoint
-
C Gets() And Puts() Functions - Javatpoint
-
Puts Function In C - Linux Hint
-
Puts() Function In C | C File Handling - Fresh2Refresh
-
C Language: Puts Function (Write String) - TechOnTheNet
-
Puts() — Write A String - IBM
-
Puts() Library Function With Examples - CodeSansar
-
Puts() Vs Printf() For Printing A String - GeeksforGeeks
-
Learn The Examples Of C Puts() Function - EduCBA
-
C Gets() & Puts() - W3schools.blog
-
[C언어/C++] Gets, Puts 문자열 입출력 함수에 대해서. - 개발자 지망생
-
C++ Puts() - C++ Standard Library - Programiz