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
Answers were Sorted based on User's Feedback
Answer / madhuri
here int i=-32 is not terminated so syntax error
if that statement was terminated then the answer would be
none in the given options because the output of the program
would be
pass1
pass2
pass2
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / bishnu agrawal
it is an error bcoz u can assing a signed value to unsigned variable so answer is null
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / subbu
this program gives an error that comparison between signed
and unsigned int
| Is This Answer Correct ? | 4 Yes | 5 No |
Answer / 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 |
What is the process of writing the null pointer?
what do u mean by Direct access files? then can u explain about Direct Access Files?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
How can you check to see whether a symbol is defined?
What does 2n 4c mean?
Why is %d used in c?
Write a Program to print this triangle: * ** * **** * ****** * ******** * ********** use two nested loops.
12 Answers MIT, TCS,
what is the output of below code int x=8,y; x>>=2; y=x; what is y value. NOTE:EXPLANATION IS COMPALSARY with binary bits
Explain the concept and use of type void.
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What is #error and use of it?
Once I have used freopen, how can I get the original stdout (or stdin) back?