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...


what would be the output of the following prog? Justify
your answer?
main()
{
unsigned char ch;
unsigned char i;
ch = -255;
printf("%d",ch);
i = -1;
printf("%d",i);

}



what would be the output of the following prog? Justify your answer? main() { unsigned char ch;..

Answer / bittu

1255

this is because -255 (00000001) when considered unsigned
looks like 1(00000001) in binary and -1(11111111) when
considered unsigned looks like 255(11111111) in binary
(11111111).

refer to this
http://www.allaboutcircuits.com/vol_4/chpt_2/3.html

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More C Interview Questions

How can I write a function analogous to scanf?

0 Answers  


WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?

4 Answers  


here is a link to download Let_Us_C_-_Yashwant_Kanetkar

3 Answers   Microsoft,


What is the use of extern in c?

0 Answers  


Explain what are header files and explain what are its uses in c programming?

0 Answers  


which one low Priority in c? a)=,b)++,c)==,d)+

10 Answers  


How can we open a file in Binary mode and Text mode?what is the difference?

1 Answers   PanTerra,


Implement bit Array in C.

0 Answers   GrapeCity,


What is a pointer in c plus plus?

0 Answers  


what is c?

4 Answers   IBM, TCS,


What is a macro, and explain how do you use it?

0 Answers  


What is cohesion and coupling in c?

0 Answers  


Categories