Answer Posted / bertilla
#include<conio.h>
#include<stdio.h>
void main()
{
int i,n,arr[15];
for(i=0;i<=14;i++){arr[i]=0;}
do
{
arr[i]=n%2;
n=n/2;
i--;
if(n==1){arr[i]=1;}
}while(n>1);
for(i=0;i<=15;i++)
{
printf("%d",arr[i]);
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
code for quick sort?
What is the use of parallelize in spark?
what is the significance of static storage class specifier?
Describe dynamic data structure in c programming language?
What is sizeof array in c?
Difference between MAC vs. IP Addressing
Tell me when is a void pointer used?
Why c is a mother language?
write a program to generate address labels using structures?
What is a global variable in c?
What are types of preprocessor in c?
the process of defining something in terms of itself is called (or) in C it is possible for the functions to call themselves. A function called a) nested function b) void function c) recursive function d) indifinite function
When is a null pointer used?
what is the format specifier for printing a pointer value?
Why we use conio h in c?