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

Answer Posted / vara

#include<stdio.h>
void main()
{
int a,b;
printf("enter a and b values");
scanf("%d%d",&a,&b);
a>b?printf("%d",a):printf("%d",b);
}

Is This Answer Correct ?    89 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hai iam working in sap sd module for one year and working in lumax ind ltd in desp department but my problem is i have done m.b.a in hr/marketing and working sap sd there is any combination it. can you give right solution of my problem. and what can i do?

1667


What does void main return?

611


Difference between Shallow copy and Deep copy?

1575


What does the c preprocessor do?

625


What does nil mean in c?

676






What is c++ used for today?

672


What are the types of pointers in c?

536


What is the use of #define preprocessor in c?

622


What are structures and unions? State differencves between them.

619


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

635


How can I pad a string to a known length?

614


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1484


What are 'near' and 'far' pointers?

624


Explain what is the stack?

638


What is scope rule of function in c?

555