WAP – represent a char in binary format

Answer Posted / vinayml

main()

{

char p = 'a' ;

int i = 0 ;



for( i = 0 ; i < 8 ; i++)

( p & (1 << i )) ?printf ("1"): printf("1");

}


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 LINKED LIST? How can you access the last element in a linked list?

636


What is assert and when would I use it?

585


What is return type in c?

646


What is a program?

669


What is .obj file in c?

650






What does 4d mean in c?

951


When should the volatile modifier be used?

689


Do pointers take up memory?

666


When should volatile modifier be used?

558


Is c object oriented?

544


Why should I prototype a function?

644


using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1317


Differentiate between functions getch() and getche().

627


What is the difference between typedef struct and struct?

602


Explain can you assign a different address to an array tag?

648