How do i alter the string so that it can contain spaces?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Toby Chipp
    New Member
    • Dec 2010
    • 1

    How do i alter the string so that it can contain spaces?

    #include <stdio.h>

    main ()
    {
    char string[100];

    printf("Enter a sentence: ");
    scanf("%s", string);

    printf("You entered \"%s\".\n", string);
    }
  • donbock
    Recognized Expert Top Contributor
    • Mar 2008
    • 2427

    #2
    Look here.

    Comment

    Working...