while scanf

This is a discussion on while scanf within the C Programming forums, part of the General Programming Boards category; i want to write if scanf input !=123ABC will do next step what is the write format?...

  1. #1
    PUI
    PUI is offline
    Registered User
    Join Date
    Sep 2006
    Posts
    12

    while scanf

    i want to write if scanf input !=123ABC
    will do next step

    what is the write format?

  2. #2
    Registered User
    Join Date
    Jun 2006
    Posts
    75
    Quote Originally Posted by PUI
    i want to write if scanf input !=123ABC
    will do next step

    what is the write format?
    Please be more clear, I can't understand what you mean and probably no one else can.

  3. #3
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Code:
    if( strcmp( input, "123ABC" ) == 0 )
        match
    else
        not a match
    Quzah.
    Hope is the first step on the road to disappointment.

  4. #4
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,236
    Maybe he means do something if user input is not 123ABC. No?
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. scanf() consideres useless
    By Snafuist in forum C Programming
    Replies: 15
    Last Post: 02-18-2009, 08:35 AM
  2. Help with a basic scanf procedure.
    By killpoppop in forum C Programming
    Replies: 9
    Last Post: 11-03-2008, 04:39 PM
  3. Replies: 2
    Last Post: 02-20-2005, 01:48 PM
  4. Scanf and integer...
    By penny in forum C Programming
    Replies: 3
    Last Post: 04-24-2003, 07:36 AM
  5. scanf - data is "put back" - screws up next scanf
    By voltson in forum C Programming
    Replies: 10
    Last Post: 10-14-2002, 05:34 AM

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