Back To C++ Built-In Functions Index
when a char array is taken as input using cin statement, spaces and the data after the space is not included, gets function overcomes this limitation
program to input a char array using gets function in stdio.h and display it using puts function in stdio.h #include
#include
#include
void main() { clrscr(); char str[10]; cout<<"\n enter a string "; gets(str); cout<<"\nstring you have entered is "; puts(str); getch(); }