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);
}
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 |
How can I write a function analogous to scanf?
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?
here is a link to download Let_Us_C_-_Yashwant_Kanetkar
What is the use of extern in c?
Explain what are header files and explain what are its uses in c programming?
which one low Priority in c? a)=,b)++,c)==,d)+
How can we open a file in Binary mode and Text mode?what is the difference?
Implement bit Array in C.
What is a pointer in c plus plus?
what is c?
What is a macro, and explain how do you use it?
What is cohesion and coupling in c?