Thread: weird bug in the scanf command

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Banned
    Join Date
    Oct 2008
    Posts
    1,535

    weird bug in the scanf command

    Code:
    char array1[50];
    scanf("%s", array1);
    
      printf("\nYou entered: %s\n", array1);
    when i enter
    "hello world"

    it puts only the word "hello" in array1
    Last edited by transgalactic2; 10-24-2008 at 12:45 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 10-06-2007, 01:25 PM
  2. Problem with RPC and scanf
    By Ricardo_R5 in forum C Programming
    Replies: 11
    Last Post: 01-08-2007, 06:15 PM
  3. Scanf bug??
    By nymph in forum C Programming
    Replies: 7
    Last Post: 03-17-2004, 09:13 PM
  4. Weird bug
    By Hunter2 in forum Windows Programming
    Replies: 1
    Last Post: 08-12-2002, 03:45 PM
  5. Weird bug in the forum
    By SilentStrike in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-16-2002, 06:16 AM