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
Where static variables are stored in c?
why wipro wase
Difference between exit() and _exit() function?
Create a simple code fragment that will swap the values of two variables num1 and num2.
Can we access array using pointer in c language?
What is bubble sort technique in c?
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
Why do we use static in c?
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)
What is volatile variable how do you declare it?
What is the function of this pointer?
What do you understand by normalization of pointers?
When can you use a pointer with a function?
Is it acceptable to declare/define a variable in a c header?
What language is windows 1.0 written?