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
Why is it usually a bad idea to use gets()? Suggest a workaround.
What are enums in c?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
Can you please explain the difference between malloc() and calloc() function?
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.
What is a nested loop?
What is the use of #define preprocessor in c?
Is c is a middle level language?
Why can arithmetic operations not be performed on void pointers?
What is the use of parallelize in spark?
Why header files are used?
What is the acronym for ansi?
write a c program in such a way that if we enter the today date the output should be next day's date.
What is the size of structure in c?
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