0% found this document useful (0 votes)
9 views1 page

Decision Making Questions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Decision Making Questions

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Write a C program to check if a given number is positive, negative, or zero.

Write a C program that takes the marks of a student as input and prints the corresponding grade
based on the following criteria:
● 90-100: Grade A
● 80-89: Grade B
● 70-79: Grade C
● 60-69: Grade D
● Below 60: Fail

Write a C program to check if a given year is a leap year. A year is a leap year if:
● It is divisible by 4
● It is not a century year unless it is divisible by 400

Write a C program that takes a day number (1 to 7) as input and prints the corresponding day of
the week. Use a switch statement.

Write a C program to find the maximum of two numbers using the ternary operator.

Write a C program to check whether a given number is odd or even.

Write a C program to check whether a given character is a vowel or a consonant using the switch
case.

Write a C program to calculate the electricity bill based on the following rules:
● For the first 100 units: ₹1.50/unit
● For the next 100 units: ₹2.50/unit
● Above 200 units: ₹3.50/unit Use if-else if to implement the logic.

Write a C program to check if a person is eligible to vote based on their age. A person is eligible
to vote if they are 18 years or older.

You might also like