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
What is a macro?
Where static variables are stored in memory in c?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
Differentiate between functions getch() and getche().
Why c is called a mid level programming language?
What are the 4 types of programming language?
Why static is used in c?
What is main return c?
What is extern variable in c with example?
What are the two types of functions in c?
What language is windows 1.0 written?
What is meant by type casting?
Explain #pragma statements.
What is an expression?
How do I determine whether a character is numeric, alphabetic, and so on?