0% found this document useful (0 votes)
6 views1 page

MCQS2

The document contains multiple-choice questions (MCQs) related to computer science concepts, including binary addition, logic gates, C programming, CSS comments, computing technology advancements, procedural programming languages, variable declarations in C, and code output. Each question provides four answer options, testing knowledge on various topics in programming and computer science. The questions cover both theoretical and practical aspects of the subject matter.

Uploaded by

bezoy777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views1 page

MCQS2

The document contains multiple-choice questions (MCQs) related to computer science concepts, including binary addition, logic gates, C programming, CSS comments, computing technology advancements, procedural programming languages, variable declarations in C, and code output. Each question provides four answer options, testing knowledge on various topics in programming and computer science. The questions cover both theoretical and practical aspects of the subject matter.

Uploaded by

bezoy777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

MCQS

1. What is the result of adding the binary numbers 1010 and its 2's 9. Which of the following is an example of a runtime error?
complement? a) Missing semicolon in code b) Attempting to divide by zero
a) 1111 b) 0000 c) 10000 d) Overflow error c) Incorrect variable name d) Syntax mismatch in function definition
2. Which of the following logic gates is equivalent to the expression A. B+B. A ?
a) AND gate b) OR gate c) XOR gate d) NOR gate 10. What is the primary function of a compiler?
3. What will be the output of the following C code snippet? a) To convert code line by line
int a = 10; b) To debug programs
int b = 20; c) To translate the entire source code into machine code before execution
printf("%d", (a > b) ? a : b); d) To manage memory allocation
a) 10 b) 20 c) -1 d) 30

4. How do you write a comment in CSS?


a) // This is a comment
b) <!-- This is a comment -->
c) /* This is a comment */
d) # This is a comment

5. The invention of which component in the late 1940s led to significant


advancements in computing technology?
a) Vacuum tubes b) Integrated circuits c) Transistors d) Relays

6. Which of the following languages is considered a procedural programming


language?
a) Python b) JavaScript c) C++ d) Haskell

7. Which of the following is a valid variable declaration in C?


a) int 1number; b) float number;
c) char name@; d) double number float;

8. What will be printed by the following code?


for (int i = 0; i < 5; i++)
{
if (i == 2)
continue;
printf("%d ", i);
}
a) 0 1 b) 0 1 2 c) 0 1 3 4 d) 2

You might also like