WAP – represent a char in binary format
Answer Posted / 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 View All Answers
What is a sequential access file?
What are the functions to open and close the file in c language?
What is meant by inheritance?
What is 2 d array in c?
How do I get a null pointer in my programs?
Simplify the program segment if X = B then C ← true else C ← false
What is wrong with this initialization?
In which language linux is written?
How can I trap or ignore keyboard interrupts like control-c?
What is register variable in c language?
Why is #define used?
What is meant by preprocessor in c?
Explain can you assign a different address to an array tag?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
Can we compile a program without main() function?