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

What is the purpose of main( ) in c language?

1088


What is the basic structure of c?

1009


Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?

1012


Explain the meaning of keyword 'extern' in a function declaration.

1113


Can i use “int” data type to store the value 32768? Why?

1143


How do you print only part of a string?

964


What is a union?

980


Write a program to print ASCII code for a given digit.

1035


Why is void main used?

1031


What does the error 'Null Pointer Assignment' mean and what causes this error?

1154


What is an arrays?

1027


In c programming language, how many parameters can be passed to a function ?

1052


What is the data segment that is followed by c?

1031


Write the Program to reverse a string using pointers.

967


Describe the difference between = and == symbols in c programming?

1295