CSC101 - Introduction to Computer Science Questions with Answers

This post is a collection of CSC101 Questions and answers to help Unidel and other school students learn and prepare for CSC101 or other computer courses. This post will guarantee you an "A" in the exam if you study all questions carefully. So do not skip any part of this post, study and practice all questions.  To get complete MTH101, PHY101, CSC Past-Question {WhatsApp: 08024476596

 

JOIN UNIDEL GENERAL WHATSAPP GROUP: Click Here To Join_

In this group, you will have access to free lecture material, past questions, and general Unidel updates. 

you will also have access to free seminars on web design, coding, online earning tips for students, and more


1. What does CPU stand for?
   a) Central Processing Unit
   b) Central Process Unit
   c) Computer Personal Unit
   d) Central Processor Unit

   Answer: a) Central Processing Unit

2. Which programming language is known for its readability and simplicity?
   a) Java
   b) Python
   c) C++
   d) Ruby

   Answer: b) Python

3. What is the primary purpose of an operating system?
   a) Running applications
   b) Managing hardware resources
   c) Creating documents
   d) Editing images

   Answer: b) Managing hardware resources

4. What is the binary equivalent of the decimal number 25?
   a) 11001
   b) 10011
   c) 11100
   d) 10100

   Answer: b) 10011

To convert the decimal number 25 to binary, we can use the process of repeated division by 2.
Decimal: 25

Step 1: 25 ÷ 2 = 12 with a remainder of 1 (LSB)
Step 2: 12 ÷ 2 = 6 with a remainder of 0
Step 3: 6 ÷ 2 = 3 with a remainder of 0
Step 4: 3 ÷ 2 = 1 with a remainder of 1
Step 5: 1 ÷ 2 = 0 with a remainder of 1 (MSB)

Reading the remainders from bottom to top gives the binary equivalent: 
11001

So, the correct binary equivalent of the decimal number 25 is:11001

5. Which data structure follows the Last In, First Out (LIFO) principle?
   a) Queue
   b) Stack
   c) Linked List
   d) Tree

   Answer: b) Stack

6. In object-oriented programming, what is encapsulation?
   a) Hiding the implementation details
   b) Inheriting from multiple classes
   c) Implementing polymorphism
   d) Writing efficient algorithms

   Answer: a) Hiding the implementation details

7. What is the purpose of the 'if' statement in programming?
   a) Looping
   b) Decision-making
   c) Variable declaration
   d) Function definition

   Answer: b) Decision-making

8. Which of the following is NOT a valid data type in most programming languages?
   a) Integer
   b) String
   c) Boolean
   d) Decimal

   Answer: d) Decimal

9. What is the role of a compiler in programming?
   a) Converts high-level code to machine code
   b) Executes the program
   c) Debugs errors
   d) Manages memory allocation

   Answer: a) Converts high-level code to machine code

10. What is the purpose of the 'git' version control system?
   a) Managing database records
   b) Tracking changes in source code
   c) Generating random numbers
   d) Creating graphical user interfaces

   Answer: b) Tracking changes in source code

11. What is the primary function of the 'else' statement in conditional programming?
   a) Start a new loop
   b) Indicate the end of a function
   c) Define an alternative action
   d) Print text to the console

   Answer: c) Define an alternative action

12. Which programming paradigm focuses on the concept of "state" and "behavior"?
   a) Procedural programming
   b) Object-oriented programming
   c) Functional programming
   d) Logic programming

   Answer: b) Object-oriented programming

13. What is the purpose of the 'NaN' value in JavaScript?
   a) Not a Number
   b) Negative and Negative
   c) No Assignment
   d) Null and Negative

   Answer: a) Not a Number

14. What is the significance of the 'volatile' keyword in programming languages like Java?
   a) It indicates a variable can't be changed
   b) It specifies that a variable may be changed unexpectedly
   c) It ensures a variable is always zero
   d) It makes a variable constant

   Answer: b) It specifies that a variable may be changed unexpectedly

15. Which sorting algorithm has the best time complexity in the average case?
   a) QuickSort
   b) BubbleSort
   c) MergeSort
   d) InsertionSort

   Answer: a) QuickSort

16. What does API stand for in the context of web development?
   a) Application Programming Interface
   b) Advanced Programming Integration
   c) Automated Program Interaction
   d) Application Process Interface

   Answer: a) Application Programming Interface

17. In computer networking, what does the acronym LAN stand for?
   a) Long Area Network
   b) Local Area Network
   c) Large Array Network
   d) Linear Access Network

   Answer: b) Local Area Network

18. Which of the following is a dynamically-typed programming language?
   a) C++
   b) Java
   c) Python
   d) Swift

   Answer: c) Python

19. What is the purpose of the 'Alt' key in combination with other keys on a computer keyboard?
   a) Copy
   b) Paste
   c) Undo
   d) Access menu shortcuts

   Answer: d) Access menu shortcuts

20. What is the role of the 'DOCTYPE' declaration in HTML?
   a) Define the document type and version
   b) Display an image on the webpage
   c) Create a hyperlink
   d) Specify text formatting

   Answer: a) Define the document type and version


21. In database terminology, what does SQL injection refer to?
   a) System Query Language injection
   b) Structured Question Language injection
   c) Security Question Language injection
   d) Structured Query Language injection

   Answer: d) Structured Query Language injection

22. What is the purpose of the 'else' clause in exception handling?
   a) Handle exceptions
   b) Execute a block of code when no exceptions occur
   c) Close the program
   d) Print error messages

   Answer: b) Execute a block of code when no exceptions occur

23. Which of the following is a markup language used for structuring content on the web?
   a) JSON
   b) XML
   c) YAML
   d) CSV

   Answer: b) XML

24. What is the significance of the term "DRY" in software development?
   a) Don't Repeat Yourself
   b) Duplicate, Repeat Yourself
   c) Define, Refactor, Yield
   d) Design, Review, Yell

   Answer: a) Don't Repeat Yourself

25. What is the purpose of the 'malloc' function in C programming?
   a) Memory allocation
   b) Mathematical calculation
   c) String concatenation
   d) File input/output

   Answer: a) Memory allocation

26. Which data structure organizes elements in a hierarchical structure with a root node?
   a) Stack
   b) Queue
   c) Tree
   d) Graph

   Answer: c) Tree

27. What does the acronym CRUD stand for in the context of database operations?
   a) Create, Read, Update, Delete
   b) Copy, Rename, Update, Delete
   c) Cut, Replace, Undo, Duplicate
   d) Compile, Run, Upload, Debug

   Answer: a) Create, Read, Update, Delete

28. Which programming language is often used for developing mobile applications in the iOS environment?
   a) Java
   b) Swift
   c) Kotlin
   d) Objective-C

   Answer: b) Swift

29. What is the purpose of the 'this' keyword in object-oriented programming?
   a) Reference to the current instance of a class
   b) Indicate the end of a function
   c) Execute a loop
   d) Define a new variable

   Answer: a) Reference to the current instance of a class

30. What is the role of the 'grep' command in Unix-based systems?
   a) Find and replace text in files
   b) Search for files in a directory
   c) Filter and print text based on a pattern
   d) Display system information

   Answer: c) Filter and print text based on a pattern

31. In the context of programming languages, what is a 'lambda' function?
   a) A function with no arguments
   b) A function written in Lisp
   c) An anonymous function
   d) A function with a fixed number of arguments

   Answer: c) An anonymous function

32. What is the purpose of the 'volatile' keyword in C and C++ programming?
   a) Indicate that a variable may be changed unexpectedly
   b) Specify constant values
   c) Define a global variable
   d) Allocate memory for a variable

   Answer: a) Indicate that a variable may be changed unexpectedly

33. Which of the following is a key principle of responsive web design?
   a) Cascading Style Sheets (CSS)
   b) Hypertext Transfer Protocol (HTTP)
   c) Flexbox layout
   d) Fluid grid layout

   Answer: d) Fluid grid layout

34. What does the acronym AJAX stand for in web development?
   a) Asynchronous JavaScript and XML
   b) Advanced JSON and XML
   c) Asynchronous jQuery and XHTML
   d) Automated JavaScript and XML

   Answer: a) Asynchronous JavaScript and XML

35. In the context of programming languages, what is a 'closure'?
   a) A block of code within a loop
   b) A function that can access variables from its lexical scope
   c) A programming error
   d) A comment within the code

   Answer: b) A function that can access variables from its lexical scope

36. What is the purpose of the 'Hash Map' data structure?
   a) Store elements in a sorted order
   b) Provide constant-time access to elements
   c) Implement a last-in, first-out (LIFO) structure
   d) Organize elements in a tree-like structure

   Answer: b) Provide constant-time access to elements

37. Which HTTP status code indicates a successful request?
   a) 200 OK
   b) 404 Not Found
   c) 500 Internal Server Error
   d) 302 Found

   Answer: a) 200 OK

38. What is the purpose of the 'docker' command in containerization technology?
   a) Build container images
   b) Remove containers
   c) Execute commands within a container
   d) List available containers

   Answer: a) Build container images

39. In the context of version control systems, what does 'commit' mean?
   a) Revert changes
   b) Save changes to the local repository
   c) Delete a branch
   d) Create a new branch

   Answer: b) Save changes to the local repository

40. What is the primary purpose of a 'try-except' block in Python?
   a) Define a function
   b) Handle exceptions
   c) Create a loop
   d) Print output to the console

   Answer: b) Handle exceptions

41. What is the purpose of the 'break' statement in a loop?
   a) Skip to the next iteration
   b) Exit the loop
   c) Continue to the next loop
   d) Pause the loop temporarily

   Answer: b) Exit the loop

42. Which of the following is a non-volatile memory type?
   a) RAM
   b) Cache
   c) ROM
   d) Virtual Memory

   Answer: c) ROM

43. What does SQL stand for?
   a) Structured Query Language
   b) Simple Query Language
   c) System Question Language
   d) Sequential Query Language

   Answer: a) Structured Query Language

44. In networking, what does DNS resolve?
   a) Domain Name System
   b) Dynamic Network Service
   c) Data Naming System
   d) Domain Naming Service

   Answer: a) Domain Name System

45. What is the purpose of the 'elif' statement in Python?
   a) Represents electricity
   b) Short for "else if"
   c) A typo for "else"
   d) A Python data type

   Answer: b) Short for "else if"

46. What is the primary function of an index in a database?
   a) Organize data alphabetically
   b) Improve query performance
   c) Count the number of records
   d) Restrict access to certain data

   Answer: b) Improve query performance

47. Which data structure uses the First In, First Out (FIFO) principle?
   a) Stack
   b) Queue
   c) Linked List
   d) Tree

   Answer: b) Queue

48. What is the purpose of the 'chmod' command in Unix-based systems?
   a) Change mode of a file
   b) Modify system settings
   c) Change the computer's hostname
   d) Create a new directory

   Answer: a) Change mode of a file

49. What does CSS stand for in web development?
   a) Computer Style Sheets
   b) Creative Style Sheets
   c) Cascading Style Sheets
   d) Content Style Sheets

   Answer: c) Cascading Style Sheets

50. In binary code, what does each digit represent?
   a) Octal number
   b) Hexadecimal number
   c) Bit
   d) Byte

   Answer: c) Bit


51. What does the term 'API' stand for in the context of software development?
   a) Advanced Program Interaction
   b) Application Programming Interface
   c) Automated Protocol Integration
   d) Application Process Interface

   Answer: b) Application Programming Interface

52. Which programming language is often used for data analysis and statistical modeling?
   a) Java
   b) Python
   c) C++
   d) Ruby

   Answer: b) Python

53. In computer science, what is a 'bit'?
   a) A binary digit, either 0 or 1
   b) A basic unit of time
   c) A block of data
   d) A type of programming language

   Answer: a) A binary digit, either 0 or 1

54. What is the purpose of the 'elif' statement in Python?
   a) Represents electricity
   b) Short for "else if"
   c) A typo for "else"
   d) A Python data type

   Answer: b) Short for "else if"

55. In the context of computer networks, what does the term 'LAN' stand for?
   a) Large Area Network
   b) Local Area Network
   c) Linked Access Node
   d) Longitudinal Array Node

   Answer: b) Local Area Network

56. What is the primary purpose of the 'try', 'catch', and 'finally' blocks in exception handling?
   a) Looping
   b) Decision-making
   c) Error handling
   d) Variable declaration

   Answer: c) Error handling

57. Which programming language was developed by Microsoft and is widely used for web development?
   a) Java
   b) C#
   c) PHP
   d) Ruby

   Answer: b) C#

58. What is the purpose of the 'break' statement in a loop?
   a) Skip to the next iteration
   b) Exit the loop
   c) Continue to the next loop
   d) Pause the loop temporarily

   Answer: b) Exit the loop

59. In the context of databases, what is normalization?
   a) Increasing redundancy in data
   b) Decreasing redundancy in data
   c) Changing data types
   d) Deleting data

   Answer: b) Decreasing redundancy in data

60. What is the purpose of the 'git' version control system?
   a) Managing database records
   b) Tracking changes in source code
   c) Generating random numbers
   d) Creating graphical user interfaces

   Answer: b) Tracking changes in source code



61. What is the purpose of the 'virtual' keyword in object-oriented programming?
   a) Indicates a virtual machine
   b) Specifies a variable as dynamic
   c) Denotes a method that can be overridden
   d) Creates a virtual file system

   Answer: c) Denotes a method that can be overridden

62. Which data structure is suitable for implementing a priority queue?
   a) Stack
   b) Queue
   c) Heap
   d) Linked List

   Answer: c) Heap

63. In programming languages, what is a 'pointer'?
   a) A variable that stores a memory address
   b) A type of loop
   c) A function parameter
   d) A data type for text

   Answer: a) A variable that stores a memory address

64. What does the term 'HTTP request' refer to in web development?
   a) Sending data from the server to the client
   b) Retrieving data from a database
   c) A client asking for resources from a server
   d) Executing JavaScript code

   Answer: c) A client asking for resources from a server

65. What is the purpose of the 'yield' keyword in Python?
   a) Signal the end of a function
   b) Generate a sequence of values lazily
   c) Create a new variable
   d) Initialize a loop

   Answer: b) Generate a sequence of values lazily

66. In the context of databases, what is a 'primary key'?
   a) A unique identifier for a record in a table
   b) The first record in a table
   c) A foreign key reference
   d) A reserved keyword in SQL

   Answer: a) A unique identifier for a record in a table

67. What does the term 'algorithm' mean in computer science?
   a) A sequence of instructions to perform a task
   b) A type of programming language
   c) A physical component of a computer
   d) A data storage structure

   Answer: a) A sequence of instructions to perform a task

68. In the context of web development, what is the purpose of the 'CSS box model'?
   a) Manage layout and spacing of elements
   b) Execute JavaScript functions
   c) Create 3D graphics
   d) Define server-side logic

   Answer: a) Manage layout and spacing of elements

69. Which of the following is an advantage of using version control systems like Git?
   a) Slower collaboration between developers
   b) Reduced ability to track changes
   c) Increased risk of code conflicts
   d) History tracking and collaboration facilitation

   Answer: d) History tracking and collaboration facilitation

70. What is the purpose of the 'ALTER TABLE' SQL statement?
   a) Insert new records into a table
   b) Modify the structure of a table
   c) Query data from a table
   d) Remove records from a table

   Answer: b) Modify the structure of a table



91. What does CPU stand for in computing?
   a) Central Processing Unit
   b) Central Program Unit
   c) Computer Processing Unit
   d) Central Peripheral Unit

   Answer: a) Central Processing Unit

92. What is the primary function of RAM in a computer?
   a) Long-term storage
   b) Temporary storage for running programs
   c) Graphics processing
   d) Power supply

   Answer: b) Temporary storage for running programs

93. Which of the following is a type of secondary storage device?
   a) RAM
   b) Hard Disk Drive (HDD)
   c) CPU
   d) Optical Mouse

   Answer: b) Hard Disk Drive (HDD)

94. What is the purpose of an operating system?
   a) Run applications
   b) Manage hardware resources
   c) Create documents
   d) Edit images

   Answer: b) Manage hardware resources

95. Which type of software is designed to protect against malicious software?
   a) Spreadsheet software
   b) Antivirus software
   c) Database software
   d) Graphics software

   Answer: b) Antivirus software

96. What does the term "GUI" stand for?
   a) General User Interface
   b) Graphical User Interface
   c) Grouped User Interaction
   d) Global User Integration

   Answer: b) Graphical User Interface

97. What is the purpose of the 'Ctrl + C' keyboard shortcut?
   a) Copy selected text or item
   b) Cut selected text or item
   c) Paste copied text or item
   d) Undo the last action

   Answer: a) Copy selected text or item

98. Which of the following is an example of an input device?
   a) Printer
   b) Monitor
   c) Keyboard
   d) Speaker

   Answer: c) Keyboard

99. What is the role of a motherboard in a computer?
   a) Store data permanently
   b) Provide power to components
   c) Connect and communicate between components
   d) Display images on the screen

   Answer: c) Connect and communicate between components

100. What does the term "URL" stand for in web addresses?
   a) Uniform Resource Locator
   b) Universal Reference Language
   c) Unified Resource Listing
   d) User Retrieval Link

   Answer: a) Uniform Resource Locator

Frequently Asked Questions:

1. What is the difference between hardware and software?

Hardware refers to the physical components of a computer system, such as the central processing unit (CPU), memory, and peripherals. Software, on the other hand, encompasses the programs and applications that run on the hardware.

2. What is the role of an operating system?

An operating system serves as the intermediary between the computer hardware and the user. It manages resources, provides a user interface, and facilitates the execution of applications.

3. How does data storage work in a computer?

Data storage in a computer is typically done using devices like hard disk drives (HDD) or solid-state drives (SSD). These devices store data permanently, allowing for retrieval even after the computer is powered off.

4. What programming languages are commonly taught in an introduction to computer course?

Commonly taught programming languages include Python, Java, C++, and JavaScript. These languages serve as a foundation for understanding key programming concepts.

5. What is the significance of algorithms in computer science?

Algorithms are step-by-step procedures or formulas for solving problems. They are fundamental to computer science as they form the basis for writing code and solving computational problems.

6. How does a computer network function?

A computer network allows multiple computers to communicate and share resources. This can be achieved through wired or wireless connections, enabling data transfer and communication between devices.

7. What is cybersecurity, and why is it important?

Cybersecurity involves protecting computer systems, networks, and data from theft, damage, or unauthorized access. It is crucial to ensure the integrity and confidentiality of digital information.

8. Can you explain the concept of 'cloud computing'?

Cloud computing involves accessing and storing data, as well as using applications over the internet instead of on your computer's hard drive. It offers flexibility, scalability, and accessibility to resources.

9. What are the fundamental principles of good programming practice?

Good programming practices include writing clear and modular code, using meaningful variable names, commenting for clarity, and testing code thoroughly to ensure functionality.

10. How can I further my knowledge of computer science beyond the introduction course?

Beyond the Introduction to Computer course, you can explore advanced topics such as machine learning, artificial intelligence, cybersecurity, and software development. Engaging in coding projects and participating in online communities can also enhance your skills.

Post a Comment

Drop a comment (ask questions)

Previous Post Next Post

Smartwatchs