Print or Display String using Puts()
On this page (7sections)
Print or Display String Using puts()
puts() displays single or multiple characters of string including spaces to the standard Input device.
Declaration:
puts(variable_name);
Example Declaration:
char ch[10]="Example";
puts(ch);
Remarks:
puts() display string to the screen.
puts() Example Program:
#include<stdio.h>
#include<conio.h>
void main()
{
char a[20];
gets(a);
puts(a);
getch();
}
Sample Output:
thiyagaraaj.com
thiyagaraaj.com
Related Pages
Continue learning with these related tutorials and programs:
- C Tutorials — Browse all C Tutorials.
- C Data Input and Data Output — Overview — printf, scanf and I/O basics.
- Single Character Input Function : getchar() — More in c data input and ouput.
- Single Character Input Function : getche() — More in c data input and ouput.