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


Please Help Members By Posting Answers For Below Questions

What is the difference between fread and fwrite function?

640


What does *p++ do?

586


Explain high-order bytes.

675


How to set file pointer to beginning c?

666


What is the easiest sorting method to use?

635






What is the use of clrscr?

596


Write a code to determine the total number of stops an elevator would take to serve N number of people.

728


Explain threaded binary trees?

679


What language is windows 1.0 written?

573


Combinations of fibanocci prime series

1112


What is the meaning of c in c language?

596


What is a MAC Address?

627


What does sizeof int return?

593


In C programming, how do you insert quote characters (‘ and “) into the output screen?

895


code for find determinent of amatrix

1516