print binary in c

Solutions on MaxInterview for print binary in c by the best coders in the world

showing results for - "print binary in c"
Adriana
29 Mar 2017
1#include <iostream>
2using namespace std;
3int main() {
4   long n, d, r, binary = 0;
5   n=10;
6   d = n;
7   int temp = 1;
8   while (n!=0) {
9      r = n%2;
10      n = n / 2;
11      binary = binary + r*temp;
12      temp = temp * 10;
13   }
14   printf("%ld", binary);
15   return 0;
16}
queries leading to this page
c print a binary numberprint data in binary cprint as binary in cprint binary int chow to print a number in binary in chow to print number in binary in cprint binary bits in cc print variable in binarybinary print in cprint value in binary in cprintf c binary numberprintf binary cprint binary number in cdisplay in binary in chow to print binary of a number incprint int in binary cc how to print binaryc print int as binaryhow to print in binary in cprinting binary in cprint binary numbers chow to print binary in cc printf in binaryc print binaryuprint binary in cc program to print letter using binary value cc print binary numbersprint binary of a number in chow to print binary representation of a number in cho to print binary in chow to print a number in binary chow to print variable as binary cbinary output in chow to print the binary value in chow to print binary n chow to print binary value in cprint as binary cprint binary cprint in binary in c stdbitsethow to print binary of a string in cc print binary numberprint binary form of a number in cprint in binary cprint binary number cprint binary representation cc binary printprint binary value in cways to write binary in cc print binaryc print in binaryhow to print a numbers binary equivalent in cc print as binaryc display in binaryprint number in binary chow to print binary number in cprint an char in binary representation using cc function to print binaryhow to print binary format in cc print binary representation of inthow to print binary format of an integer in cc print binary value of intprint number as binary cprintf binary in cc print binary integerprint number in binary form cc print value in binary how to print binary value of a character in cc print char as binaryc print number in binaryc language print binary valueprint in binary in cprint value in binary chow to print binary value of an integer in cprint binary in c