Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find the binary of a number?

Answer Posted / santhi perumal

#include<stdio.h>
#include<conio.h>

int main()
{
int i,number;
printf("Enter the Number\n");
scanf("%d",&number);

for(i=7;i>=0;i--)
{
if((1<<i) & number)
printf("1");
else
printf("0");
}
}

Is This Answer Correct ?    9 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it usually a bad idea to use gets()? Suggest a workaround.

1795


What are enums in c?

1212


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1095


Can you please explain the difference between malloc() and calloc() function?

1130


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

16024


What is a nested loop?

1139


What is the use of #define preprocessor in c?

1081


Is c is a middle level language?

1071


Why can arithmetic operations not be performed on void pointers?

1049


What is the use of parallelize in spark?

1030


Why header files are used?

1124


What is the acronym for ansi?

1051


write a c program in such a way that if we enter the today date the output should be next day's date.

2200


What is the size of structure in c?

1161


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4282