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
Write a program to swap two numbers without using the third variable?
When would you use a pointer to a function?
What is the difference between fread and fwrite function?
How many types of operators are there in c?
What is the main difference between calloc () and malloc ()?
What is an array in c?
Can a local variable be volatile in c?
Explain #pragma statements.
Why is sizeof () an operator and not a function?
Is c is a procedural language?
What is atoi and atof in c?
Why doesnt this code work?
Why do we use int main?
What is use of #include in c?
What is structure of c program?