how to use showbits function?

Answers were Sorted based on User's Feedback



how to use showbits function?..

Answer / p govind rao

convert a decimal to binary we should use showbit()
function or a normal program to convert decimal to binary .


showbit(7) gives 000000000000111 .

Is This Answer Correct ?    62 Yes 18 No

how to use showbits function?..

Answer / santhosh

showbit is a pre-defined function is used for showing the
decimal value converts to binary digits. For Example:

#include<stdio.h>
main()
{
int a = 10;
showbit(7);
return 0;
}

Output:
0000 0111

Is This Answer Correct ?    20 Yes 51 No

Post New Answer

More C Interview Questions

what will the following program do? void main() { int i; char a[]="String"; char *p="New Sring"; char *Temp; Temp=a; a=malloc(strlen(p) + 1); strcpy(a,p); //Line no:9// p = malloc(strlen(Temp) + 1); strcpy(p,Temp); printf("(%s, %s)",a,p); free(p); free(a); } //Line no 15// a) Swap contents of p & a and print:(New string, string) b) Generate compilation error in line number 8 c) Generate compilation error in line number 5 d) Generate compilation error in line number 7 e) Generate compilation error in line number 1

1 Answers   IBM,


What are keywords in c with examples?

0 Answers  


write a program for egyptian fractions in c?

1 Answers   Satyam,


What was noalias and what ever happened to it?

0 Answers  


What do you mean by Recursion Function?

0 Answers   Hexaware,






What is the difference between a string and an array?

0 Answers  


int main() { int i=-1,j=-1;k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d%d%d%d%d",i,j,k,l,m); }

3 Answers   HCL,


Can we change the value of #define in c?

0 Answers  


Why pointers are used in c?

0 Answers  


hi, which software companys will take,if d candidate's % is jst 55%?

0 Answers  


A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females.

2 Answers  


How to write a program for swapping two strings without using 3rd variable and without using string functions.

7 Answers   iGate, Infotech,


Categories