Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Quiz

Total questions: 41

Worksheet time: 14mins

Name
Class
Date
1.

Which of the following is a compiled language?

a)

C++

b)

Python

c)

JavaScript

d)

PHP

2.

In C++, what is the output of: int x=1; ++x; cout<<"Result is:", x * 5 + 2;

a)

12

b)

7

c)

Result is: 12

d)

Result is: x

3.

Which of the following is NOT a valid variable name in C++?

a)

_var

b)

Var123

c)

123Var

d)

var_name

4.

What is the primary key used for in a database?

a)

Uniquely identifying a record

b)

Storing multiple values

c)

Creating a foreign key

d)

Sorting data

5.

Which SQL clause is used to filter records?

a)

WHERE

b)

HAVING

c)

GROUP BY

d)

ORDER BY

6.

Which of the following is NOT an operating system?

a)

Windows

b)

iOS

c)

Oracle

d)

Android

7.

What is the main function of an operating system?

a)

Manage hardware and software resources

b)

Compile programs

c)

Run user applications

d)

Connect to the internet

8.

Which device connects multiple networks?

a)

Switch

b)

Router

c)

Hub

d)

Modem

9.

What is phishing?

a)

A social engineering attack to steal sensitive data

b)

A firewall technique

c)

A type of antivirus

d)

A network protocol

10.

Which of the following is NOT AI

a)

Ginger Writer

b)

Neura Edge

c)

ChatGPT

d)

OpenAI

11.

Which AI technique is used in chatbots?

a)

Natural Language Processing (NLP)

b)

Reinforcement Learning

c)

Neural Networks

d)

Genetic Algorithms

12.

UML stands for:

a)

Universal Modeling Logic

b)

Unified Modeling Language

c)

Unique Model Layout

d)

None

13.

What does DevOps focus on?

a)

Continuous integration and deployment

b)

Only software development

c)

Only hardware testing

d)

User interface design

14.

What is the output of print(2 ** 3) in Python?

a)

8

b)

6

c)

9

d)

16

15.

In C++, which keyword is used to dynamically allocate memory?

a)

new

b)

malloc

c)

allocate

d)

create

16.

Which of the following sorting algorithms has an average time complexity of O(n log n)?

a)

Merge Sort

b)

Bubble Sort

c)

Insertion Sort

d)

Selection Sort

17.

In object-oriented programming, what does encapsulation mean?

a)

Hiding data and restricting access

b)

Allowing global access to variables

c)

Using functions instead of loops

d)

Converting a program to machine language

18.

What is the default return type of the main() function in C++?

a)

void

b)

float

c)

int

d)

char

19.

Which operator is used for pointer dereferencing in C?

a)

&

b)

->

c)

.

d)

*

20.

What is the purpose of an operating system?

a)

Only manages hardware

b)

Only manages software

c)

Acts as an interface between hardware and software

d)

Only runs the internet

21.

What does "HTTP" stand for?

a)

Hypertext Transfer Protocol

b)

High Transmission Transfer Process

c)

Hardware Transfer Technique Protocol

d)

Hyperlink and Text Processing

22.

What is the function of a router in a network?

a)

Connects devices in a single room

b)

Forwards data packets between networks

c)

Prevents unauthorized access

d)

Encrypts data for security

23.

What does "DNS" stand for in networking?

a)

Domain Name System

b)

Dynamic Network Service

c)

Digital Network Setup

d)

Data Naming Structure

24.

Which of the following is a private IP address?

a)

192.168.1.1

b)

10.0.0.1

c)

8.8.8.8

d)

172.217.3.14

25.

What does "SQL" stand for?

a)

Structured Query Language

b)

Standard Query Language

c)

Sequential Query Language

d)

Server Query Language

26.

Which SQL command is used to remove all records from a table without deleting the structure?

a)

DROP

b)

TRUNCATE

c)

DELETE

d)

CLEAR

27.

What type of database does MongoDB use?

a)

NoSQL

b)

Relational

c)

SQL

d)

Object-Oriented

28.

What is the primary goal of software engineering?

a)

Write as much code as possible

b)

Develop reliable and efficient software

c)

Increase CPU usage

d)

Avoid project deadlines

29.

What does CRUD stand for in databases?

a)

Create, Read, Update, Delete

b)

Code, Run, Undo, Debug

c)

Create, Retrieve, Use, Develop

d)

Classify, Record, Upload, Delete

30.

Which language is primarily used for database queries?

a)

SQL

b)

Python

c)

Java

d)

C++

31.

GPT stands for:

a)

Generalized Processing Technology

b)

Generative Pre-trained Transformer

c)

Global Programming Tool

d)

Graphical Processing Transformer

32.

Founder of OpenAI:

a)

Elon Musk & Sam Altman

b)

Bill Gates

c)

Jeff Bezos

d)

Mark Zuckerberg

33.

Founder of DeepSeek:

a)

DeepSeek AI Team

b)

Sundar Pichai

c)

Jeff Bezoz

d)

Yann LeCun

34.

Neuralink CEO:

a)

Elon Musk

b)

Jeff Bezos

c)

Tim Cook

d)

Sam Altman

35.

Which AI chatbot became widely popular in 2022?

a)

ChatGPT

b)

Siri

c)

Bixby

d)

Google Assistant

36.

What does "IoT" stand for?

a)

Internet of Things

b)

Information on Technology

c)

Input of Text

d)

Internet of Text

37.

Which company developed GitHub Copilot?

a)

Microsoft

b)

Google

c)

Apple

d)

Amazon

38.

What does "URL" stand for?

a)

Uniform Resource Locator

b)

Universal Reference Link

c)

Unique Resource Link

d)

Unstructured Readable Language

39.

What is the primary function of a compiler?

a)

Convert source code to machine code

b)

Detect viruses

c)

Encrypt data

d)

Run cloud applications

40.

Taj Mahal is located in which city:

a)

India

b)

Taj Nagar

c)

Agra

d)

JahanNagar

41.

Professor Dr. Muhammad Usman has done his PHD From:

a)

America

b)

South Korea

c)

China

d)

North Korea