Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

WAP &#8211; 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 a sequential access file?

1152


What are the functions to open and close the file in c language?

1021


What is meant by inheritance?

1068


What is 2 d array in c?

1008


How do I get a null pointer in my programs?

1095


Simplify the program segment if X = B then C ← true else C ← false

2994


What is wrong with this initialization?

990


In which language linux is written?

1212


How can I trap or ignore keyboard interrupts like control-c?

1051


What is register variable in c language?

1017


Why is #define used?

1266


What is meant by preprocessor in c?

994


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

1035


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5446


Can we compile a program without main() function?

1106