FREE TUTORIALS ON C programming

Saturday, January 25, 2014

#include<stdio.h>

int main()

{
    char str[5]; //declaration of character array
    
    fgets(str,5,stdin);  //better control than gets
    
    fputs(str,stdout);//prints the string of characters to  the console

    fflush(stdin); //flushes the carriage return
    
    getchar();               //waits for character input
    
    return 0;                //EXIT_SUCCESS
    
}
11:53 PM   Posted by Unknown with No comments

0 comments:

Post a Comment

Bookmark Us

Delicious Digg Facebook Favorites More Stumbleupon Twitter

Search