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 |
What is a #include preprocessor?
What is the real difference between arrays and pointers?
27 Answers Hexaware, Logic Pro, TCS,
What is volatile in c language?
How can you convert integers to binary or hexadecimal?
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +
What are the types of type specifiers?
Explain about the constants which help in debugging?
main() { int x=20,y=35; x = y++ + x++; y = ++y + ++x; printf("%d %d\n",x,y); } what is the output?
Is c high or low level?
du u know test pattern for robosoft? Plz share
1 Answers RoboSoft, TATA, Wipro,
how is the examination pattern?
Write a program in c to print 1 121 12321 1234321 123454321
11 Answers ANR, College School Exams Tests, Mu Sigma, Wipro,