1. What is the purpose of a compiler?
2. Identify the error in the following C program:
#include <stdio.h>
int main() {
printf("Hello World!")
return 0;
}
3. What is the difference between local and global variables?
4. What will be the output of the following code?
int a = 3;
int b = 6;
int c = a + b;
printf("%d", c);
5. What is the correct syntax for scanning user input?
6. What are the rules for defining an identifier in C?
7. What are comments in C, and what are their types?