Test Computer Science
Test Computer Science
SCIENCE
CHAPTER: 01
Total marks: 35
Obtained marks:
1.Solve all the Multiple-choice Questions.
1.. Which of the following is a common feature of an IDE?
i) Web hosting services ii) Text formatting tools
iii) Code editor, debugger, and compiler iv) Video editing tools
2.Which of the following is an example of a text editor?
i) Google Chrome ii) Microsoft Wor
iii) Notepad++ iv) Microsoft Excel
3. What does the compiler do if it finds an error in the code?
A) Ignores the error B) Fixes the error
automatically
C) Stops and shows an error message D) Completes the program
without any warning
4. What is the correct syntax to declare a variable in C?
A) var x = 5; B) int x = 5;
C) let x = 5; D) declare x = 5;
5. Which of the following is a reserved word in C?
A) printf B) scanf
C) if D) myVariable
6. What happens if a header file is included multiple times in a
program without protection?
A) The program will run normally B) It will cause a multiple definition
error
C) It will optimize the code D) It will ignore repeated inclusions
7. Which of the following pairs of identifiers would be treated as
different in C?
A) myVar and myvar B) function1 and Function1
C) HELLO and hello D)ALL OF THE ABOVE
8. Which of the following is the correct order of a basic C
program structure?
A) Variable declaration → Function → Header files
B) Header files → Main function → Statements
C) Statements → Header files → Main function
D) Function → Header files → Return statement
9. Which of the following is the correct syntax for a single-
line comment in C?
A) <!-- Comment --> B) /* Comment */
C) # Comment D) // Comment
10. Can comments be nested in C (i.e., /* /* nested */ */)?
A) Yes, always B) No, it causes a compilation error
C) Only in certain compilers D) Only with special syntax