puts C




 puts-c

Learn C - C tutorial - Puts c - C examples - C programs

C - puts() Function - Definition and Usage

  • The puts() function automatically inserts a newline character at the end of each string it displays, so each subsequent string displayed with puts() is on its own line.
  • puts() returns non-negative on success, or EOF on failure.
  • Uses of Puts() function in C :
    • puts() is used to Print Message which is similar to printf statement in C .
    • Asks the user for entering the data.
C Puts Function

C Syntax

puts(string_Variable_name) ;

Sample coding - C - Puts Function

#include<stdio.h>
#include<conio.h>
void main()
{
    clrscr();  
    puts("welcome to wikitechy world(www.wikitechy.com)");
    puts("This is puts() function");
    getchar();
}

C Code - Explanation

code-explanation-puts-function
  1. Here puts("welcome to wikitechy world (www.wikitechy.com)") specifies the print statement in newline.
  2. Here puts("This is puts() function") specifies the print statement in a newline.

Sample Output - Programming Examples

puts-function-sample-output
  1. Here in this output welcome to wikitechy world (www.wikitechy.com) statement has been printed which is represented in puts() function .
  2. Here in this output This is puts() function statement has been printed which is represented in puts() function in next new line.

View More Quick Examples


Related Searches to c puts function

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×