WAP – represent a char in binary format

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many levels of pointers can you have?

805


What is the scope of an external variable in c?

651


What is malloc and calloc?

677


write an algorithm to display a square matrix.

2321


Explain void pointer?

683






What does sizeof function do?

727


Why doesnt the call scanf work?

784


What is a far pointer in c?

695


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1581


What is structure padding and packing in c?

714


What is function what are the types of function?

641


Why C language is a procedural language?

700


In which header file is the null macro defined?

977


Difference between goto, long jmp() and setjmp()?

822


How is a null pointer different from a dangling pointer?

661