data input in binary format

This is a discussion on data input in binary format within the C Programming forums, part of the General Programming Boards category; Hi all, I would like to know if it is possible for scanf() function in C to read input from ...

  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, 10:07 AM
  3. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 08:40 PM
  4. display tree data in binary tree format
    By xddxogm3 in forum C++ Programming
    Replies: 4
    Last Post: 12-10-2003, 11:47 PM

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