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 do we make a global variable accessible across files? Explain the extern keyword?
What is the difference between class and object in c?
4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.
Can two or more operators such as and be combined in a single line of program code?
What are identifiers c?
Explain output of printf("Hello World"-'A'+'B'); ?
What the advantages of using Unions?
What is %lu in c?
What are the types of type qualifiers in c?
How can you find the day of the week given the date?
What language is windows 1.0 written?
What is the general form of function in c?
What is bash c?
Explain the use of function toupper() with and example code?
What is getche() function?