What is the result
main()
{
char c=-64;
int i=-32
unsigned int u =-16;
if(c>i){
printf("pass1,");
if(c<u)
printf("pass2");
else
printf("Fail2");}
else
printf("Fail1);
if(i<u)
printf("pass2");
else
printf("Fail2")
}
a)Pass1,Pass2
b)Pass1,Fail2
c)Fail1,Pass2
d)Fail1,Fail2
e)none

Answer Posted / vikraman85

u should not assign a negative value to unsigned int! b'coz
it has only +ve values 0to2^15-1..

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a macro?

657


Where static variables are stored in memory in c?

524


What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers

681


Differentiate between functions getch() and getche().

625


Why c is called a mid level programming language?

607






What are the 4 types of programming language?

583


Why static is used in c?

624


What is main return c?

519


What is extern variable in c with example?

538


What are the two types of functions in c?

566


What language is windows 1.0 written?

575


What is meant by type casting?

629


Explain #pragma statements.

604


What is an expression?

658


How do I determine whether a character is numeric, alphabetic, and so on?

622