Program to find larger of the two numbers without using if-else,while,for,switch
Answer Posted / gokul prajapat
void main()
{
int a,b,max;
printf("Enter two values : ");
scanf("%d%d");
max=(a>b)*a + (a<b)*b;
printf("\nmaximum value : %d",max);
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How do I use strcmp?
Is it possible to pass an entire structure to functions?
What is header file in c?
Tell me what is the purpose of 'register' keyword in c language?
How can I discover how many arguments a function was actually called with?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
How is pointer initialized in c?
Write the program that calculates and prints the average of several integers. Assume that the last value read is sentinel 9999.
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What are data types in c language?
What are types of preprocessor in c?
What is the purpose of ftell?
Explain Function Pointer?
How to declare pointer variables?
What is infinite loop?