biggest of two no's with out using if condition statement

Answer Posted / ansh

Use tenary operator..

c=a<b?b:a;

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does placing some code lines between the comment symbol help in debugging the code?

536


What does malloc () calloc () realloc () free () do?

548


Explain 'bit masking'?

641


Why is void main used?

609


What is cohesion in c?

533






What is the difference between declaring a variable and defining a variable?

710


What are structure types in C?

655


What does %d do?

708


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

571


What is the use of gets and puts?

590


What is static memory allocation?

597


Why does this code crash?

610


Write a program to print factorial of given number without using recursion?

563


What is s in c?

601


What are register variables in c?

565