0

I was wondering if we can print the binary form of any type of data ,i.e., it's 0's and 1's form (i think we can say that it's machine language form) using existing methods in c.

Or will i have to do it myself by defining a function myself that converts it in that form?

Also it will be helpful if anybody can tell me where can i ask questions about working on a project(like compression etc) from people who can guide me what to do?

Lakshay Chhikara
  • 186
  • 2
  • 12

1 Answers1

0

You may use the itoa function. It converts integers to string with specific base:

itoa(num, string, 2);
Shimon Rachlenko
  • 5,469
  • 40
  • 51
  • Although `itoa` doesn't exist on all platforms, you would probably have to write your own function if you wanted to be portable. – Gavin Smith Sep 29 '13 at 13:20