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
Explain what is a const pointer?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
When should the register modifier be used? Does it really help?
What are the types of type qualifiers in c?
What are linker error?
Do character constants represent numerical values?
What is null pointer in c?
What is the sizeof () operator?
Hai what is the different types of versions and their differences
Write a program to identify if a given binary tree is balanced or not.
What is a nested formula?
What is wrong with this initialization?
Write a program to show the change in position of a cursor using c
What is the difference between text files and binary files?
What is p in text message?