Get a string Using gets() function

                                 



#include<stdio.h>

#include<conio.h>

void main()

{

char str[50];

printf("Enter a String:- ");

gets(str);

printf("You entered : %s", str);

getch();

}


Output:-

Enter a String:- hello

You entered : hello

Comments

Popular posts from this blog

Check whether the no entered is Palindrome or not

Calculate Factorial of a given no with help of Recursion

Find max. and min. element in the integer array