Computer Science 1 Flashcards

1
Q

What is the purpose of an algorithm?

A

To provide a step-by-step procedure for solving a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

True or False: A variable in programming can hold multiple values at the same time.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Fill in the blank: The __________ is the part of the computer that performs calculations and makes decisions.

A

CPU

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does ‘IDE’ stand for in programming?

A

Integrated Development Environment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which data structure uses LIFO (Last In, First Out) principle?

A

Stack

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Multiple Choice: Which of the following is not a programming paradigm? A) Object-oriented B) Functional C) Procedural D) Non-linear

A

D) Non-linear

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the main function of an operating system?

A

To manage computer hardware and software resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

True or False: A syntax error occurs when the code is logically incorrect.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of a compiler?

A

To translate high-level programming code into machine code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fill in the blank: In object-oriented programming, a __________ is a blueprint for creating objects.

A

Class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is recursion in programming?

A

A function that calls itself in order to solve a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Multiple Choice: Which of the following is a type of database? A) Relational B) Linear C) Sequential D) Graphical

A

A) Relational

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a primary key in a database?

A

A unique identifier for a record in a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

True or False: A linked list can store elements in non-adjacent memory locations.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of a firewall?

A

To protect a network by controlling incoming and outgoing traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fill in the blank: __________ is the process of finding and fixing errors in software.

A

Debugging

17
Q

What does ‘HTTP’ stand for?

A

HyperText Transfer Protocol

18
Q

Multiple Choice: Which of the following is a valid variable name? A) 1stVariable B) first_variable C) first-variable D) first variable

A

B) first_variable

19
Q

What is the purpose of version control systems?

A

To manage changes to source code over time.

20
Q

True or False: In Python, indentation is not important.

A

False

21
Q

What is the difference between an interpreter and a compiler?

A

An interpreter executes code line by line, while a compiler translates the entire code at once.

22
Q

Fill in the blank: __________ is a collection of data that can be accessed or modified.

A

Database

23
Q

What does ‘API’ stand for?

A

Application Programming Interface

24
Q

Multiple Choice: Which protocol is used for sending email? A) FTP B) SMTP C) HTTP D) SNMP

A

B) SMTP

25
Q

What is the role of a software developer?

A

To design, create, and maintain software applications.

26
Q

True or False: A binary search algorithm can only be applied to sorted lists.

A

True

27
Q

What is the main advantage of using a cloud service?

A

Scalability and accessibility from any location.