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

Explain what are its uses in c programming?

598


What is s or c?

598


How many main () function we can have in a project?

615


Why can’t constant values be used to define an array’s initial size?

837


Define C in your own Language.

642






a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

706


Write a C program linear.c that creates a sequence of processes with a given length. By sequence it is meant that each created process has exactly one child. Let's look at some example outputs for the program. Here the entire process sequence consists of process 18181: Sara@dell:~/OSSS$ ./linear 1 Creating process sequence of length 1. 18181 begins the sequence. An example for a sequence of length three: Sara@dell:~/OSSS$ ./linear 3 Creating process sequence of length 3. 18233 begins the sequence. 18234 is child of 18233 18235 is child of 18234 ........ this is coad .... BUt i could not compleate it .....:( #include #include #include #include int main(int argc, char *argv[]) { int N; pid_t pid; int cont; if (argc != 2) { printf("Wrong number of command-line parameters!\n"); return 1; } N = atoi(argv[1]); printf("Creating process sequence of length %d.\n",N); printf("%d begins the sequence.\n",getpid()); /* What I have to do next ?????? */ }

1620


Are enumerations really portable?

596


How can I read/write structures from/to data files?

553


What is dynamic memory allocation?

812


Write a C program to count the number of email on text

1420


What is meant by gets in c?

609


Why is sprintf unsafe?

619


What is the process of writing the null pointer?

607


What does main () mean in c?

615