Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript Site
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


Gets function
 

 

Description

This example shows how to get user input from the keyboard using the gets( ) function

Code

/*get user data from the keyboard with gets*/
#include <stdio.h>

char input[20];

main()
{
puts("Please enter your name.");
/*get the users input using gets*/
gets(input);
/*display name that was entered*/
printf("Hello there : %s\n",input);

return 0;
}

Information

tested on Visual C++ 6

 

 

 

 

Download

gets1.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Windows directory(VB)
Name of browser(ASP.net)
get the computer name(c)
strip out certain tags(php)
Launch notepad(C)
Messagebox in C(C)
Select Case example(ASP)
FPrintf(C)

    




Copyright © 2003 by programmershelp.co.uk