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
How can I make sure that my program is the only one accessing a file?
What is unary operator?
How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?
What are the different data types in C?
what is bit rate & baud rate? plz give wave forms
What is data types?
Why shouldn’t I start variable names with underscores?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What is wrong with this initialization?
How can a string be converted to a number?
Can the curly brackets { } be used to enclose a single line of code?
What is the purpose of main() function?
What are data structures in c and how to use them?
Why do we use pointer to pointer in c?
What is register variable in c language?