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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the equivalent code of the following statement in WHILE LOOP format?

1093


What are the different types of control structures?

805


Write a C program in Fibonacci series.

844


Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.

5105


How would you use the functions fseek(), freed(), fwrite() and ftell()?

923


What is abstract data structure in c?

766


What are valid operations on pointers?

946


What is the function of this pointer?

892


When a c file is executed there are many files that are automatically opened what are they files?

823


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

899


What is the difference between array and linked list in c?

870


Can the sizeof operator be used to tell the size of an array passed to a function?

846


What is the maximum length of an identifier?

898


Can stdout be forced to print somewhere other than the screen?

847


How can I determine whether a machines byte order is big-endian or little-endian?

826