- What is the difference between intandfloatdata types in C?
- Answer: intis used for whole numbers (integers) whilefloatis used for numbers with decimal points (floating-point numbers).
- What is the purpose of the mainfunction in C?
- Answer: The mainfunction is the entry point of a C program. Every C program execution begins from themainfunction.
- How do you declare an array in C?
- Answer: You can declare an array by specifying its data type, size enclosed in square brackets, and a variable name. For example: int numbers[10];
- Explain the syntax for a simple ifstatement in C.
- Answer: if (condition) { // code to execute if condition is true } else { // code to execute if condition is false (optional) }
- What is the difference between the =and==operators in C?
- Answer: =is the assignment operator used to assign a value to a variable.==is the comparison operator used to check if two values are equal.
- What does the breakstatement do inside a loop in C?
- Answer: The breakstatement exits the loop immediately, even if the loop condition is still true.
- What is a pointer variable in C?
- Answer: A pointer variable stores the memory address of another variable. It allows you to indirectly access and modify the value of another variable.
- How do you read user input using scanffunction in C?
- Answer: You can use scanffunction with format specifiers like%dfor integers or%cfor characters to read user input and store it in variables.
- What are the different storage classes (auto, static, extern) in C?
- Answer: Storage classes define the scope and lifetime of variables. auto(default) creates a variable that exists only within its block scope.staticcreates a variable that retains its value between function calls.externdeclares a variable that is defined in another file.
- What is the difference between compilation and execution in C programming?
- Answer: Compilation translates the C code into machine code understandable by the computer. Execution runs the machine code to perform the intended operations of the program.

