Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

  Take Quiz (Monsoon) Beta Version !!
  Do You have Qs. in your Mind ??? Ask it as Qs. or MCQs or create it as polling Live Now !!

C Programming :: Declarations and Initializations

7. What is the output of the following 'C' program ?

void main(){
char c=125;
c=c+10;
printf("%d",c);
}

Answer: Option C

Explanation :

Here char is signed so,the size of char is 1 bytes and its value range are -128 to 127,



and it will be something like below



-128 -127 -126 .......... 0 ....... 126 127 in the cycle. 



Now as per questions c = 125 it is under the above limit.



but when 10 added to it, it becomes 125 10 = 135



125 126 127 -128 -127 -126 -125 -124 -123 -122 -121 



So, count above 135 will fall at -121, so Answer will be -121



If in the question it would have given unsigned char then answer will be 135

Post Your Answer Here:     

Reply     |    Rate This: +0 -0      |     Report     |     To Reading List



Report Error

Please Login First Click Here

Reply     |    Rate This: +2 -0      |     Report     |     To Reading List



Report Error

Please Login First Click Here

Reply     |    Rate This: +2 -0      |     Report     |     To Reading List



Report Error

Please Login First Click Here

Reply     |    Rate This: +0 -0      |     Report     |     To Reading List



Report Error

Please Login First Click Here