Program to find larger of the two numbers without using if-else,while,for,switch

Answer Posted / kristian vitozev

#include <stdio.h>

int main(void)
{
int a = 7, b = 25;

a>b ? printf("%d [a]",a) : printf("%d [b]", b);

return 0;
}

Is This Answer Correct ?    9 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why double pointer is used in c?

568


Where register variables are stored in c?

553


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

615


What is nested structure in c?

615


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1214






Explain what is the heap?

624


Why do we write return 0 in c?

555


Can you please explain the difference between syntax vs logical error?

698


Can you please explain the difference between strcpy() and memcpy() function?

603


How can I convert a number to a string?

609


What is selection sort in c?

612


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

784


What is #include called?

570


What is the value of h?

593


What is the general form of function in c?

611