a=0;
b=(a=0)?2:3;
a) What will be the value of b? why
b) If in 1st stmt a=0 is replaced by -1, b=?
c) If in second stmt a=0 is replaced by -1, b=?
Answer Posted / syamkumarm
a)3
because it is ternery operator its work like a if.. else..
in the comdition part a=0 i.e. the result of expression is
zero so it goes to else part i.s 3
b)b=3
c)b=2
| Is This Answer Correct ? | 15 Yes | 3 No |
Post New Answer View All Answers
Can you write the algorithm for Queue?
What does the file stdio.h contain?
Place the #include statement must be written in the program?
write a program fibonacci series and palindrome program in c
State the difference between realloc and free.
What are keywords c?
Why n++ execute faster than n+1 ?
What are the types of bitwise operator?
Define C in your own Language.
In a byte, what is the maximum decimal number that you can accommodate?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
Is it cc or c in a letter?
What is a ternary operator in c?
What are dangling pointers? How are dangling pointers different from memory leaks?