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 / naresh m

main()
{
int a[12],n,m,i=0;
printf("enter the no to find binary no's");
scanf("%d",&n);
while(n!=0)
{
m=i++;
a[i]=n%2;
n=n/2;
}
printf("binary value is");
for(i=m;i>=0;i--)
{
printf("%d",a[i]);
}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where static variables are stored in c?

1042


why wipro wase

2249


Difference between exit() and _exit() function?

1077


Create a simple code fragment that will swap the values of two variables num1 and num2.

1237


Can we access array using pointer in c language?

1041


What is bubble sort technique in c?

932


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

3129


Why do we use static in c?

1066


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

2049


What is volatile variable how do you declare it?

1027


What is the function of this pointer?

1219


What do you understand by normalization of pointers?

1005


When can you use a pointer with a function?

991


Is it acceptable to declare/define a variable in a c header?

1060


What language is windows 1.0 written?

989