Getting rid of spaces in C

This is a discussion on Getting rid of spaces in C within the C Programming forums, part of the General Programming Boards category; I am trying to get rid of spaces from input. How would I do that? Thanks....

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    103

    Getting rid of spaces in C

    I am trying to get rid of spaces from input. How would I do that? Thanks.

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Do you have the input in a char array, now?

    Is a for loop ok to use?

    Post up your try at it, please.

  3. #3
    CSharpener vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,424
    scanf with most formats does it automatically
    The first 90% of a project takes 90% of the time,
    the last 10% takes the other 90% of the time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Changing 3 spaces to tabs
    By dnguyen1022 in forum C Programming
    Replies: 2
    Last Post: 12-21-2008, 11:51 PM
  2. Handling spaces in command line arguments
    By starkhorn in forum C++ Programming
    Replies: 7
    Last Post: 11-16-2004, 01:42 PM
  3. Getting rid of spaces in a string
    By David101 in forum C Programming
    Replies: 38
    Last Post: 09-23-2004, 09:01 PM
  4. Getting rid of spaces in a string
    By scythe in forum C Programming
    Replies: 3
    Last Post: 10-23-2003, 04:05 AM
  5. Replies: 5
    Last Post: 06-30-2003, 12:52 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21