πŸ“š Review Questions - Sessions 1-9

Oral & Programming Assessment

Comprehensive review questions covering all 9 sessions. Perfect for students returning after a break!

Session 1: Hello World & C Basics

πŸ—£οΈ Oral Questions

Q1: What is C programming? Why is it called a "middle-level" language?
Q2: What are the essential components of a C program? Explain each part.
Q3: What is the purpose of the `#include ` directive?
Q4: What does `int main()` mean? Why is it important?
Q5: What is the difference between a compiler and an interpreter?
Q6: Why do we use `return 0;` at the end of main()?

πŸ’» Programming Questions

Program 1: Write a program to display your name and age

Create a program that prints your name and age on separate lines.

Hint: Use printf() statements. Remember to include stdio.h
Program 2: Display a simple pattern

Write a program that displays:

* ** ***

Session 2: printf() & scanf() Functions

πŸ—£οΈ Oral Questions

Q1: What is the difference between printf() and scanf()?
Q2: What are format specifiers? List at least 5 format specifiers and their uses.
Q3: Why do we use `&` (address of operator) with scanf() but not with printf()?
Q4: What happens if you forget the `&` in scanf() for an integer variable?
Q5: Explain the difference between `%d`, `%f`, and `%c` format specifiers.
Q6: What is the purpose of `\n` in printf() statements?

πŸ’» Programming Questions

Program 1: User Information Program

Write a program that asks for user's name, age, and favorite number, then displays all the information.

Program 2: Simple Calculator Input

Write a program that takes two numbers from the user and displays them with labels.

Session 3: Variables & Data Types

πŸ—£οΈ Oral Questions

Q1: What is a variable? Why do we need variables in programming?
Q2: List the basic data types in C and explain when to use each.
Q3: What is the difference between `int`, `float`, and `char`?
Q4: What happens if you try to store a decimal number in an `int` variable?
Q5: Explain the concept of variable declaration vs initialization.
Q6: What is the size of `int`, `float`, and `char` in bytes? (Approximate)

πŸ’» Programming Questions

Program 1: Variable Practice

Declare variables for storing: your age (int), height in meters (float), first initial (char), and display all three.

Program 2: Type Conversion

Write a program that takes an integer and a float, adds them, and displays the result. Observe what happens.

Session 4: Arithmetic Operations

πŸ—£οΈ Oral Questions

Q1: List all arithmetic operators in C and explain each one.
Q2: What is PEMDAS? Give an example of how it works in C.
Q3: What is the modulo operator (%)? Give a practical example of its use.
Q4: What is the result of: `10 / 3` in integer division? What about `10.0 / 3`?
Q5: Explain the difference between `++a` and `a++`.
Q6: What happens when you divide by zero in C?

πŸ’» Programming Questions

Program 1: Basic Calculator

Write a program that takes two numbers and displays the result of addition, subtraction, multiplication, and division.

Program 2: Area Calculator

Write a program to calculate and display the area of a rectangle (length Γ— width) and circle (Ο€ Γ— radiusΒ²).

Hint: Use 3.14 for Ο€

Session 5: Math Magic & Calculations

πŸ—£οΈ Oral Questions

Q1: How do you calculate the remainder when dividing two numbers?
Q2: What is the difference between integer division and floating-point division?
Q3: How would you calculate the average of three numbers?
Q4: Explain how to convert temperature from Celsius to Fahrenheit.

πŸ’» Programming Questions

Program 1: Average Calculator

Write a program that takes three test scores and calculates the average.

Program 2: Temperature Converter

Write a program to convert Celsius to Fahrenheit using the formula: F = (C Γ— 9/5) + 32

Session 6: Advanced Arithmetic Operations

πŸ—£οΈ Oral Questions

Q1: What happens when you mix int and float in calculations?
Q2: Explain the order of operations for: `2 + 3 * 4 - 1`
Q3: How do you use parentheses to change the order of operations?
Q4: What is the result of: `15 % 4`? Explain what this means.

πŸ’» Programming Questions

Program 1: Complex Calculation

Write a program that calculates: (a + b) Γ— (c - d) / 2, where a, b, c, d are user inputs.

Program 2: Modulo Practice

Write a program that takes a number and displays whether it's even or odd using the modulo operator.

Session 7: Decision Making - Basic Conditionals

πŸ—£οΈ Oral Questions

Q1: What is an if statement? When do we use it?
Q2: List all comparison operators and explain each one.
Q3: What is the difference between `==` and `=` in C?
Q4: What are boolean values? What values represent true and false in C?
Q5: Explain the syntax of an if statement with an example.
Q6: What happens if the condition in an if statement is false?

πŸ’» Programming Questions

Program 1: Age Checker

Write a program that asks for age and displays "You are an adult" if age >= 18, otherwise "You are a minor".

Program 2: Number Comparison

Write a program that takes two numbers and displays which one is larger, or if they are equal.

Program 3: Grade Checker

Write a program that takes a score and displays "Pass" if score >= 50, otherwise "Fail".

Session 8: Advanced Conditionals

πŸ—£οΈ Oral Questions

Q1: What is the difference between `if` and `if-else`?
Q2: When should we use `else-if` chains instead of multiple `if` statements?
Q3: Explain the three logical operators: `&&`, `||`, and `!`
Q4: What is a nested if statement? Give an example scenario.
Q5: What is the result of: `(5 > 3) && (2 < 4)`? Explain.
Q6: What is the result of: `!(10 > 5)`? Explain.

πŸ’» Programming Questions

Program 1: Grade System

Write a program that takes a score and displays:
β€’ A if score >= 90
β€’ B if score >= 80
β€’ C if score >= 70
β€’ D if score >= 60
β€’ F otherwise

Program 2: Logical Operators

Write a program that checks if a person can vote (age >= 18) AND has an ID card (1=yes, 0=no).

Program 3: Nested Conditions

Write a program that checks if a number is positive, and if it's even or odd. Use nested if statements.

Session 9: Switch Statements - Menu Master

πŸ—£οΈ Oral Questions

Q1: What is a switch statement? When should we use it instead of if-else?
Q2: What is the purpose of `break` in a switch statement? What happens if we forget it?
Q3: What is the `default` case? Is it mandatory?
Q4: Can we use switch with floating-point numbers? Why or why not?
Q5: What is case grouping? Give an example.
Q6: When would you choose switch over if-else, and vice versa?

πŸ’» Programming Questions

Program 1: Simple Menu

Write a program with a menu:
1. Display "Hello"
2. Display "World"
3. Display "Goodbye"
Use switch statement to handle the choice.

Program 2: Calculator Menu

Create a menu-driven calculator using switch:
1. Addition
2. Subtraction
3. Multiplication
4. Division
Take two numbers and perform the selected operation.

Program 3: Case Grouping

Write a program that groups weekdays (1-5) and weekends (6-7) using case grouping in a switch statement.

🎯 Mixed Review Questions (All Sessions)

πŸ—£οΈ Oral Questions

Q1: Write the complete structure of a C program. Explain each part.
Q2: What is the difference between `int` and `float`? When would you use each?
Q3: Explain the order of operations for: `5 + 3 * 2 - 1 / 2`
Q4: What is the difference between `if`, `if-else`, and `switch`? When to use each?
Q5: Explain the difference between `&&` and `||` with examples.
Q6: What happens in this code: `if (5 > 3 || 2 > 4)`? Explain the result.

πŸ’» Programming Questions

Program 1: Complete Student Information System

Write a program that:
1. Takes student name, age, and marks in 3 subjects
2. Calculates total and average
3. Displays grade based on average (A, B, C, D, F)
4. Uses if-else or switch for grading

Program 2: Menu-Driven Calculator

Create a complete calculator with menu:
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Modulo
Use switch statement. Handle division by zero.

Program 3: Age Category Classifier

Write a program that classifies age:
β€’ Child: < 13
β€’ Teen: 13-19
β€’ Adult: 20-64
β€’ Senior: >= 65
Use if-else chain or switch with case grouping.