Class recording: Here
PPT: Here
January 30th, 2022
- Write a program (WAP) to accept an year from the user and check whether it is a leap year or not. Rules to check leap year.
- Write a program with two integer variables a = 5 and b = 8. Swap the values of the two numbers by using a temporary variable such that the value of a is now 8 and the value of b is now 5.
- Do problem 2 without using a temporary variable.
- WAP to accept a number from 1 to 7 and display the corresponding day of the week.
- WAP to accept two numbers and a operator (+, -, *, /, %) from user and perform the operation on the two numbers as per the operator entered and display the result.
- Write a menu driven program to accept a choice from user and as per the choice perform the following operations:
- Area of a circle
- Area of a rectangle
- Area of a triangle (Heron's formula)
- Volume of a sphere
- WAP to acept an alphabet from user and display whether it is a vowel or consonant.
- Write a munu driven program to accept a choice from user and as per the choice perform the following operations:
- Convert Decimal to Binary
- Convert Binary to Decimal
- Convert Decimal to Hexadecimal
- Convert Hexadecimal to Decimal
- Convert Decimal to Octal
- Convert Octal to Decimal
- WAP to display all even numbers from 1 to 100.
- WAP to display all odd numbers between two number entered by user.
- WAP to print all alphabets from a to z.
- WAP to accept a number from user and display the factorial of that number.
- WAP to accept a number from user and display whether it is an Armstrong number or not.
- WAP to accept a number frm user and display its multiplication table.
- WAP to accept a number from user and display the number of digits in that number.
- WAP to accept a number from user and display the sum of digits in that number.
- WAP to accept a number from user and display the product of digits in that number.
- WAP to accept a number from user and display the reverse of that number.
- WAP to accept a number from user and display whether it is a palindrome or not.
- WAP to accept a number from user and display whether it is a prime number or not.
- WAP to display all prime numbers between 1 to 100.
- WAP to accept two numbers from user and display the Greatest Common Divisor (GCD) (or the Highest Common Factor (HCF)) of those two numbers.
- WAP to accept two numbers from user and display the Least common multiple (LCM) of those two numbers.
- WAP to accept two numbers from user and display the nCr of those two numbers.
- WAP to print numbers from 1 to 100 with their binary and octal representation.
- Print all letter combinations from AA to ZZ using a single for loop, i.e., AA, AB, AC, ..., BA, BB, BC, ..., ZZ.
-
Learn operator precedence in C (click on image to enlarge):
You can take help of this Mnemonic.
-
Practice operator precedence questions from C in Depth book.
Happy Learning!
{% include disqus.html %}