Use gets() to get user input.
Get user input in C.
Date Created:Monday February 26th, 2007 09:43 PM
Date Modified:Wednesday July 30th, 2008 11:09 PM
#include <stdio.h>
int main()
{
char name[512] = { 0 };
printf("Enter your name:\n");
gets(name);
printf("%s is your name",name);
return 0;
}
Downloads:
Download: input.c 191 B
Please login or Click Here to register for downloads
User input with Gets by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
