Q#1: What does a constraint define in a system?
(A) Unlimited resources
(B) Limitation or restriction on system resources
(C) Only memory usage
(D) Only processing speed
Answer: (B) Limitation or restriction on system resources
Q#2: What is an lvalue?
(A) A constant value
(B) A memory location where a value can be stored
(C) A function name
(D) A program instruction
Answer: (B) A memory location where a value can be stored
Q#3: In an assignment statement, an lvalue appears on which side?
(A) Right side
(B) Left side
(C) Both sides
(D) None
Answer: (B) Left side
Q#4: What does the โcurrentโ pointer represent?
(A) Memory address of CPU
(B) Index of currently focused element in array or list
(C) Size of array
(D) End of program
Answer: (B) Index of currently focused element in array or list
Q#5: What is an algorithm?
(A) Programming language
(B) Hardware device
(C) Finite sequence of steps to solve a problem
(D) Data type
Answer: (C) Finite sequence of steps to solve a problem
Q#6: Which data structure is most widely used?
(A) Graph
(B) Tree
(C) Array
(D) Stack
Answer: (C) Array
Q#7: Arrays are mainly used to store:
(A) Different types of data
(B) Similar type of data
(C) Only numbers
(D) Only characters
Answer: (B) Similar type of data
Q#8: Data can be organized in how many main ways?
(A) One
(B) Two
(C) Three
(D) Four
Answer: (B) Two
Q#9: Which of the following is a linear data structure?
(A) Tree
(B) Graph
(C) Array
(D) Network
Answer: (C) Array
Q#10: Which of the following is a non-linear data structure?
(A) Array
(B) List
(C) Tree
(D) Queue
Answer: (C) Tree
Q#11: The main purpose of data structures is to:
(A) Increase program size
(B) Organize and store data efficiently
(C) Reduce programming languages
(D) Remove data permanently
Answer: (B) Organize and store data efficiently
Q#12: argc and argv are used for:
(A) File processing
(B) Command line arguments
(C) Memory management
(D) Loop control
Answer: (B) Command line arguments
Q#13: What does argc represent?
(A) Argument count
(B) Argument code
(C) Argument command
(D) Argument character
Answer: (A) Argument count
Q#14: argv stores:
(A) Program instructions
(B) Command line arguments
(C) Memory addresses
(D) File names
Answer: (B) Command line arguments
Q#15: Efficiency of a solution mainly depends on:
(A) Space and time resources
(B) Program color
(C) Number of variables
(D) Computer brand
Answer: (A) Space and time resources
Q#16: Elements in an array are accessed using:
(A) Function
(B) Pointer only
(C) Index
(D) File name
Answer: (C) Index
Q#17: What is a linked list?
(A) Collection of functions
(B) Sequence of nodes connected through pointers
(C) Hardware component
(D) Programming language
Answer: (B) Sequence of nodes connected through pointers
Q#18: Static arrays are stored in:
(A) Heap memory
(B) Stack memory
(C) ROM
(D) Cache
Answer: (B) Stack memory
Q#19: Dynamic arrays are stored in:
(A) Heap memory
(B) Stack memory
(C) Register
(D) ROM
Answer: (A) Heap memory
Q#20: Which data structure allows dynamic size?
(A) Array
(B) Linked List
(C) Matrix
(D) Table
Answer: (B) Linked List
Q#21: What is an index in an array?
(A) Data type
(B) Location of element in array
(C) Name of array
(D) Pointer value
Answer: (B) Location of element in array
Q#22: What is a node in a linked list?
(A) Hardware component
(B) Element containing data and pointer to next node
(C) Programming language
(D) Memory register
Answer: (B) Element containing data and pointer to next node