Input string with spaces ( gets() example ) - Devbhoomi

FREE JOB ALERT & ONLINE TUTORIALS

Hot

Post Top Ad

Monday 6 November 2017

Input string with spaces ( gets() example )

#include <stdio.h>

int main()
{
   char str[50];

   printf("Enter a string with space: ");
   gets(str);

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

   return(0);
}
OUTPUT
Enter a string with space: Hello Developer's
You entered: Hello Developer's

No comments:

Post a Comment

Post Top Ad