WAP – represent a char in binary format

Answers were Sorted based on User's Feedback



WAP – represent a char in binary format ..

Answer / vinayml

main()

{

char p = 'a' ;

int i = 0 ;



for( i = 0 ; i < 8 ; i++)

( p & (1 << i )) ?printf ("1"): printf("1");

}


Is This Answer Correct ?    0 Yes 0 No

WAP &#8211; represent a char in binary format ..

Answer / johnson

?eh? this doesn't make sense. The answer will obviously be
11111111.

Is This Answer Correct ?    0 Yes 0 No

WAP &#8211; represent a char in binary format ..

Answer / kalpana.y



738211

Is This Answer Correct ?    0 Yes 0 No

WAP &#8211; represent a char in binary format ..

Answer / civa

#include <stdio.h>
main()

{

char p = 'a' ;

int i = 0 ;



for( i = 0 ; i < 8 ; i++)

( p & (1 << 7-i )) ?printf ("1"): printf("0");

}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are conditional operators in C?

0 Answers   Adobe,


Where define directive used?

0 Answers  


What is a volatile keyword in c?

0 Answers  


What are static variables in c?

0 Answers  


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

0 Answers   Lovely Professional University,






How to implement variable argument functions ?

1 Answers   HP,


How important is structure in life?

0 Answers  


What's the difference between DELETE TABLE and TRUNCATE TABLE commands?

2 Answers   CTC,


Explain what is a const pointer?

0 Answers  


What is the purpose of Scanf Print, getchar, putchar, function?

3 Answers  


What is header file in c?

0 Answers  


What is the data segment that is followed by c?

0 Answers  


Categories