Thread: data input in binary format

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    2

    Question data input in binary format

    Hi all,
    I would like to know if it is possible for scanf() function
    in C to read input from a keyboard in binary form or some
    code for conversion has to be written for conversion to
    binary format first.
    If possible to read binary input directly by scanf()
    what is the conversion specification used?

    Thanks in advance,

    Aamir

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    ... watch out for strtol(), using base 2.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  2. Replies: 0
    Last Post: 11-04-2006, 11:07 AM
  3. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  4. display tree data in binary tree format
    By xddxogm3 in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2003, 12:47 AM