User Input
eharetea

User input using pointers in C.

User input in C.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Friday August 01st, 2008 02:22 AM


#include <stdio.h>

void printMe(charprinted)
{
        int i 0;
        while (printed[i])
        {
                printf("%c"printed[i++]);
        }

}


int main()
{
        char firstName[20];
        printf("Insert Your First Name:\n");

        scanf"%s"firstName);
        printf("Your fist name is: ");
        printMe(firstName);


        return 0;
}




Downloads:
Download: user_input.c 399 B

Please login or Click Here to register for downloads
Creative Commons License
User Input 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