Main Menu

HOME

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

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   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
vertical scrolling text(Blitzbasic)
A daily MySQL row displayed(PHP)
Admin rights for Windows(VB)
backup a folder to a zip file(PHP)
adds a command prompt here to the context menu(VBScript)
Random letters(PHP)
Counter example(PHP)
convert an IP address to a hostname(C Sharp)

    




Copyright © 2003 by programmershelp.co.uk