Programming Fundamentals MCQs (Set-1)

What is a computer program?

A A hardware circuit
B A data cable
C A sequence of instructions
D A storage partition

What is an algorithm?

A Finite ordered problem steps
B A programming language
C A memory address
D A user interface

What does pseudocode provide?

A Language independent steps
B Executable machine code
C A hardware description
D A database schema

Which flowchart shape usually shows a decision?

A Rectangle
B Oval
C Parallelogram
D Diamond

What is source code?

A A compiled executable
B Human readable program text
C A processor register
D A disk partition

What does a compiler generally do?

A Stores source files
B Designs a processor
C Translates source code
D Draws flowcharts

How does an interpreter commonly run code?

A Fabricates processor chips
B Stores variables permanently
C Executes instructions during translation
D Converts data to voltage

A syntax error violates what?

A Language grammar rules
B Program purpose
C Memory capacity
D Network protocol

A logic error causes what?

A Invalid punctuation only
B A damaged processor
C Incorrect program result
D A missing keyboard

What is debugging?

A Compressing source files
B Finding and fixing defects
C Translating speech
D Allocating network ports

What does a variable represent?

A Named changeable value
B Fixed hardware pin
C Program comment
D Compiler warning

What is a constant in a program?

A Fixed program value
B A temporary loop counter
C An input device
D A changing array index

What is an identifier?

A A numeric operator
B Program element name
C A file format
D A control-flow branch

What does variable declaration usually specify?

A Loop and condition
B Input and output
C File and folder
D Name and type

What is initialization?

A Deleting a variable
B Renaming a function
C Giving an initial value
D Starting a computer

Which data type commonly stores whole numbers?

A Boolean
B Integer
C Character
D Floating point

Which type represents true or false?

A String
B Boolean
C Integer
D Character

Which type commonly stores one symbol?

A Integer
B Character
C Boolean
D Array

Which type stores decimal numeric values?

A Boolean
B Character
C Pointer
D Floating point

What is type conversion?

A Changing a value's representation type
B Sorting an array
C Repeating a loop
D Opening a file

What does variable scope determine?

A How fast a CPU runs
B How files are sorted
C Which key is pressed
D Where a name is accessible

What is a reserved keyword?

A A word with language meaning
B A user chosen file name
C A comment marker
D A numeric constant only

What do comments primarily do?

A Change program output
B Allocate memory
C Call a function
D Explain code to readers

What does an IDE commonly combine?

A CPU and memory chips
B Router and modem
C Monitor and keyboard
D Editor and development tools

Why divide a program into modules?

A To increase syntax errors
B To remove all variables
C To organize related functionality
D To prevent testing