CCpE - Certified Computer Engineer (B CompE Bachelor of Computer Engineering) — Questions and Answers
Question 1: Regarding polymorphism, which of the following is false?
- Helps in redefining the same functionality
- Increases overhead of function definition always (Correct answer)
- Ease in readability of program
- It is feature of OOP
Correct answer: Increases overhead of function definition always
Polymorphism, meaning 'many forms,' allows objects of different classes to be treated as objects of a common type, enabling a single interface to represent different underlying forms. While dynamic polymorphism (runtime polymorphism) might introduce a slight overhead due to virtual function tables, it does not always increase the overhead of function definition. It primarily helps in redefining functionality, improving readability, and is a fundamental OOP feature.
Question 2: How long does it take to insert at the end of a dynamic array?
- O(1)
- O(n)
- O(logn)
- Either O(1) or O(n) (Correct answer)
Correct answer: Either O(1) or O(n)
Inserting an element at the end of a dynamic array typically takes O(1) time on average (amortized constant time). However, if the array's underlying storage becomes full, a new, larger array must be allocated, and all existing elements copied over. This resizing operation takes O(n) time, where 'n' is the number of elements. Thus, the time complexity can be either O(1) in most cases or O(n) in the worst-case scenario during a resize.
Question 3: In which problem class does P reside in the P vs NP question?
- Problems that are undecidable
- Problems verifiable in polynomial time but not solvable
- Problems requiring exponential time to solve and verify
- Problems solvable in polynomial time (Correct answer)
Correct answer: Problems solvable in polynomial time
P is the class of decision problems that can be solved by a deterministic algorithm in polynomial time, representing 'tractable' or efficiently solvable problems.
Question 4: The majority of complex instructions in CISC architecture are stored in .
- Transistors (Correct answer)
- CMOS
- Register
- Diodes
Correct answer: Transistors
In CISC (Complex Instruction Set Computer) architecture, complex instructions are implemented directly in hardware using a microcode approach. This microcode is essentially a sequence of simpler operations stored in a control memory, which is ultimately built from transistors. These transistors form the logic gates and memory cells that define the instruction set's behavior.
Question 5: Which of the following best sums up an array?
- Arrays are immutable once initialised
- Container of objects of similar types (Correct answer)
- Array is not a data structure
- A data structure that shows a hierarchical behavior
Correct answer: Container of objects of similar types
An array is a fundamental data structure that stores a fixed-size sequential collection of elements of the same data type. All elements in an array are of the same type (e.g., all integers, all characters), and they are stored contiguously in memory, allowing for efficient access by index.
Question 6: What is the key property of a greedy algorithm?
- It uses randomness to find near-optimal solutions
- It explores all possible solutions before choosing the best one
- It divides the problem into equal halves recursively
- It makes the locally optimal choice at each step without reconsidering past decisions (Correct answer)
Correct answer: It makes the locally optimal choice at each step without reconsidering past decisions
A greedy algorithm makes the best choice available at each step and never revisits or undoes those choices, hoping the locally optimal selections lead to a global optimum.
Question 7: What is the subnet mask for a /26 CIDR block?
- 255.255.255.0
- 255.255.255.192 (Correct answer)
- 255.255.255.128
- 255.255.255.224
Correct answer: 255.255.255.192
A /26 prefix means 26 network bits, leaving 6 host bits, which corresponds to a subnet mask of 255.255.255.192.
Question 8: Which protocol is used to send email from a mail client to a mail server?
- FTP
- SMTP (Correct answer)
- POP3
- IMAP
Correct answer: SMTP
SMTP (Simple Mail Transfer Protocol) is used to send outgoing email from a client to a server and between mail servers.
Question 9: What is the IPv6 equivalent of an IPv4 broadcast address?
- Multicast
- Unicast
- IPv6 does not support broadcast (Correct answer)
- Anycast
Correct answer: IPv6 does not support broadcast
IPv6 does not support broadcast; it uses multicast and anycast instead to efficiently deliver packets to multiple hosts.
Question 10: Which sorting algorithm has the best average-case time complexity among the following?
- Selection sort
- Insertion sort
- Bubble sort
- Merge sort (Correct answer)
Correct answer: Merge sort
Merge sort achieves O(n log n) average-case time, which is optimal for comparison-based sorting.
Question 11: Which execution model does a systolic array implement?
- A single processor executes instructions sequentially
- Multiple threads share a single instruction stream
- Instructions are dispatched in dataflow order at runtime
- Data flows rhythmically through a fixed network of processing elements (Correct answer)
Correct answer: Data flows rhythmically through a fixed network of processing elements
Systolic arrays pass data through a regular grid of simple PEs in a pipelined, lock-step fashion, efficiently implementing operations like matrix multiplication.
Question 12: What is the purpose of the `#pragma once` directive in C header files?
- Disables all macros in the file
- Prevents the header from being included more than once per compilation unit (Correct answer)
- Forces a single-pass compilation
- Marks the file as executable once
Correct answer: Prevents the header from being included more than once per compilation unit
`#pragma once` is a non-standard but widely supported guard that ensures a header is included only once during compilation.
Question 13: Which Boolean expression represents De Morgan's first theorem?
- (A+B)' = A'·B'
- (A·B)' = A'·B'
- (A+B)' = A'+B'
- (A·B)' = A'+B' (Correct answer)
Correct answer: (A·B)' = A'+B'
De Morgan's first theorem states that the complement of a product (NAND) equals the sum of the complements: (A·B)' = A' + B'.
Question 14: The action of eliminating a stack element is known as .
- Pop (Correct answer)
- Push
- Create
- Evaluation
Correct answer: Pop
In a stack data structure, the operation of eliminating an element is known as 'pop'. This operation removes the element that is currently at the top of the stack. Stacks adhere to the Last-In, First-Out (LIFO) principle, so the most recently added element is always the one removed by a pop operation.
Question 15: What is the output of calling a virtual method through a base class pointer pointing to a derived object in C++?
- Compilation error occurs
- Derived class version is called (Correct answer)
- Runtime exception is thrown
- Base class version is called
Correct answer: Derived class version is called
Virtual dispatch ensures the most-derived override is called at runtime, which is the core mechanism of polymorphism in C++.
Question 16: In Java, how do you create an array?
- int arr() = new int(3);
- int arr[];
- int arr[] = new int[3]; (Correct answer)
- int arr[] = new int(3);
Correct answer: int arr[] = new int[3];
In Java, arrays are objects, so they must be created using the `new` keyword. The syntax `new int[3]` allocates memory for an array of 3 integers. The `int arr[]` part declares a variable `arr` that can hold an array of integers, and the assignment links it to the newly created array object.
Question 17: The purpose of a Translation Lookaside Buffer (TLB) in a microprocessor is to:
- Cache frequently used virtual-to-physical address mappings (Correct answer)
- Store recently executed branch target addresses
- Hold decoded micro-operations for out-of-order execution
- Buffer write operations to reduce main memory bandwidth
Correct answer: Cache frequently used virtual-to-physical address mappings
The TLB caches recent virtual-to-physical address translations to avoid repeated page-table walks, speeding up memory accesses.
Question 18: Which cache write policy writes data to both the cache and main memory simultaneously?
- Write-through (Correct answer)
- Write-invalidate
- Write-back
- Write-allocate
Correct answer: Write-through
Write-through updates main memory immediately on every cache write, keeping memory consistent at the cost of higher bus traffic.
Question 19: Which I/O technique allows a device to transfer data directly to/from memory without CPU involvement on every byte?
- Direct Memory Access (DMA) (Correct answer)
- Interrupt-driven I/O
- Memory-mapped I/O
- Programmed I/O (polling)
Correct answer: Direct Memory Access (DMA)
DMA offloads bulk data transfers to a dedicated controller, freeing the CPU to execute other instructions while the transfer completes.
Question 20: Which C operator is used to access a struct member through a pointer?
- *
- .
- -> (Correct answer)
- ::
Correct answer: ->
The `->` operator dereferences a pointer and accesses the named member in one step, equivalent to `(*ptr).member`.
Question 21: How many bits are in one hexadecimal digit?
- 8
- 4 (Correct answer)
- 16
- 2
Correct answer: 4
One hexadecimal digit represents exactly 4 bits, since hex uses base 16 and 2^4 = 16 possible values (0–F).
Question 22: In order to decrease the Costs, both the CISC and RISC architectures have been developed.
- Semantic gap (Correct answer)
- Cost
- Time delay
- All of the above
Correct answer: Semantic gap
Both CISC and RISC architectures were developed, in part, to address the 'semantic gap.' This gap refers to the difference between the high-level operations expressed in programming languages and the low-level operations directly executable by hardware. CISC aimed to bridge this by providing complex instructions, while RISC focused on optimizing simpler instructions for better compiler efficiency.
Question 23: What is the primary purpose of the Translation Lookaside Buffer (TLB) in a paged memory system?
- Buffer DMA transfers
- Store recently used disk blocks
- Cache recent virtual-to-physical address translations (Correct answer)
- Hold the page replacement policy state
Correct answer: Cache recent virtual-to-physical address translations
The TLB is a small, fast hardware cache that stores recent page table entries to avoid costly main-memory page table lookups on every memory access.
Question 24: Which type of network topology connects every node directly to every other node?
- Star
- Ring
- Mesh (Correct answer)
- Bus
Correct answer: Mesh
A full mesh topology connects every node to every other node, providing maximum redundancy but high cabling cost.
Question 25: Which statement regarding variable names in C is accurate?
- Variable names cannot start with a digit (Correct answer)
- Variable can be of any length
- They can contain alphanumeric characters as well as special characters
- It is not an error to declare a variable to be one of the keywords(like goto, static)
Correct answer: Variable names cannot start with a digit
In C programming, a fundamental rule for variable naming is that an identifier cannot begin with a digit. Variable names must start with either an alphabet (uppercase or lowercase) or an underscore (`_`). While they can contain digits later in the name, starting with one is strictly prohibited, ensuring clear distinction from numeric literals.
Question 26: How many words can an 8-bit CPU process?
- 4-bits – 32 bits
- 8-bits – 16 bits
- 8-bits – 32 bits
- 8-bits – 64 bits (Correct answer)
Correct answer: 8-bits – 64 bits
An 8-bit CPU's native word size is 8 bits, meaning it processes data in 8-bit chunks. However, through multiple instruction cycles and software techniques, it can manipulate and process larger data types, such as 16-bit, 32-bit, or even 64-bit 'words' by breaking them down into 8-bit operations. Therefore, while its fundamental unit is 8 bits, it can effectively handle data up to 64 bits in size.
Question 27: An AVL tree is a self-balancing BST where the height difference between left and right subtrees of any node is at most:
- 2
- log n
- 1 (Correct answer)
- 0
Correct answer: 1
AVL trees maintain the invariant that the balance factor (height difference) of any node is -1, 0, or +1.
Question 28: Which routing protocol uses the Bellman-Ford algorithm?
- OSPF
- RIP (Correct answer)
- BGP
- EIGRP
Correct answer: RIP
RIP (Routing Information Protocol) uses the Bellman-Ford algorithm to calculate the shortest path based on hop count.
Question 29: A microprocessor's memory-mapped I/O scheme differs from isolated (port-mapped) I/O in that:
- Memory-mapped I/O requires special IN/OUT instructions
- Memory-mapped I/O requires a dedicated I/O bus separate from the memory bus
- Memory-mapped I/O uses the same address space and instructions as regular memory accesses (Correct answer)
- Isolated I/O places peripherals in the same address space as RAM
Correct answer: Memory-mapped I/O uses the same address space and instructions as regular memory accesses
With memory-mapped I/O, peripherals occupy addresses in the main memory map and are accessed using standard load/store instructions, unlike port-mapped I/O which needs IN/OUT instructions.
Question 30: A trie (prefix tree) is most efficiently used for which operation?
- Finding shortest paths in graphs
- Sorting integers
- Prefix-based string search and autocomplete (Correct answer)
- Storing key-value pairs with integer keys
Correct answer: Prefix-based string search and autocomplete
Tries store strings character by character, enabling O(m) prefix searches where m is the query length.
Question 31: Which OOP principle is most prominently applied in multilevel inheritance?
- Code reusability (Correct answer)
- Code readability
- Code efficiency
- Flexibility
Correct answer: Code reusability
Multilevel inheritance, where a class inherits from another class which itself inherits from a third class, primarily emphasizes code reusability. It allows for a hierarchical structure where common functionalities can be defined at higher levels and reused by subsequent derived classes, building upon existing code rather than rewriting it. This promotes efficient development and maintenance.
Question 32: What does a reorder buffer (ROB) primarily enable in a superscalar processor?
- Translation of virtual to physical addresses
- In-order commit of instructions after out-of-order execution (Correct answer)
- Scheduling of memory bus transactions
- Parallel fetch of multiple instruction streams
Correct answer: In-order commit of instructions after out-of-order execution
The ROB holds instructions until they are ready to retire in program order, allowing precise exception handling despite out-of-order execution.
Question 33: Which protocol is used to assign IP addresses automatically to devices on a network?
- DHCP (Correct answer)
- SMTP
- DNS
- FTP
Correct answer: DHCP
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses and other network configuration to clients.
Question 34: What is the primary function of the ARP protocol?
- Encrypt network traffic
- Resolve IP addresses to MAC addresses (Correct answer)
- Assign IP addresses dynamically
- Route packets between networks
Correct answer: Resolve IP addresses to MAC addresses
ARP (Address Resolution Protocol) maps a known IP address to its corresponding MAC address on a local network.
Question 35: What is the recurrence relation for merge sort, and what does the Master Theorem give as its solution?
- T(n) = T(n-1) + O(1) → O(n)
- T(n) = 2T(n/2) + O(n) → O(n log n) (Correct answer)
- T(n) = 2T(n/2) + O(n²) → O(n²)
- T(n) = T(n/2) + O(1) → O(log n)
Correct answer: T(n) = 2T(n/2) + O(n) → O(n log n)
Merge sort divides into 2 halves (2T(n/2)) and merges in O(n) time; by the Master Theorem case 2, this solves to O(n log n).
Question 36: What does the 'load factor' of a hash table represent?
- The ratio of stored elements to total bucket count (Correct answer)
- The number of hash collisions
- The speed of the hash function
- The size of each bucket
Correct answer: The ratio of stored elements to total bucket count
Load factor = number of elements / number of buckets, and it determines when to resize the hash table.
Question 37: What is a pure virtual function in C++?
- A function that returns void
- A function with no parameters
- A virtual function with no body, declared with = 0 (Correct answer)
- A static member function defined in a base class
Correct answer: A virtual function with no body, declared with = 0
A pure virtual function (= 0) makes its class abstract; derived classes must provide an implementation unless they too are abstract.
Question 38: What one of the following is untrue?
- A variable defined once can be defined again with different scope
- A variable must be declared and defined at the same time (Correct answer)
- A single variable cannot be defined with two different types in the same scope
- A variable refers to a location in memory
Correct answer: A variable must be declared and defined at the same time
It is untrue that a variable must be declared and defined at the same time in C. A variable can be declared (e.g., `extern int x;`) to inform the compiler about its type and name without allocating memory. The actual definition, which allocates memory, can occur separately in another part of the program or a different file.
Question 39: Which layer does a standard switch primarily operate on in the OSI model?
- Layer 3 - Network
- Layer 4 - Transport
- Layer 1 - Physical
- Layer 2 - Data Link (Correct answer)
Correct answer: Layer 2 - Data Link
A standard switch operates at Layer 2 (Data Link), forwarding frames based on MAC addresses.
Question 40: In the Banker's Algorithm for deadlock avoidance, what does the 'safe state' guarantee?
- All resources are allocated optimally
- No circular wait can form
- There exists a sequence in which every process can obtain its maximum resources and finish (Correct answer)
- No process is currently waiting
Correct answer: There exists a sequence in which every process can obtain its maximum resources and finish
A safe state means the OS can find an ordering (safe sequence) of processes such that each can run to completion using currently available and released resources.
Question 41: What is the difference between `struct` and `union` in C?
- `union` members cannot be pointers
- A `union` is a named `struct`
- `struct` allows only numeric types; `union` allows any type
- A `struct` stores members sequentially with individual storage; a `union` shares the same memory for all members (Correct answer)
Correct answer: A `struct` stores members sequentially with individual storage; a `union` shares the same memory for all members
In a `struct`, each member has its own storage; in a `union`, all members share the same memory location, sized to the largest member.
Question 42: What is the purpose of a hash function in a hash table?
- Compress data to save memory
- Encrypt stored values for security
- Sort elements before storage
- Map keys to array indices for O(1) average-case lookup (Correct answer)
Correct answer: Map keys to array indices for O(1) average-case lookup
A hash function maps a key to an index in an array, enabling average O(1) insert, delete, and lookup operations in a hash table.
Question 43: A processor uses non-uniform memory access (NUMA). A thread migrated to a remote NUMA node will experience:
- No change in memory latency
- Lower latency for all memory accesses
- Higher latency when accessing its home node's memory (Correct answer)
- Reduced cache miss rate
Correct answer: Higher latency when accessing its home node's memory
In NUMA systems, memory attached to a remote node is accessed over an interconnect, incurring higher latency and lower bandwidth than local node memory.
Question 44: What does CSMA/CD stand for in Ethernet networks?
- Carrier Sense Multiple Access with Collision Detection (Correct answer)
- Carrier Sense Media Access with Collision Delay
- Channel Sense Multiple Access with Collision Delay
- Channel Synchronization Multiple Access with Collision Detection
Correct answer: Carrier Sense Multiple Access with Collision Detection
CSMA/CD is the MAC protocol used in traditional Ethernet to handle collisions by detecting and backing off when two devices transmit simultaneously.
Question 45: What port number does HTTPS use by default?
- 21
- 80
- 443 (Correct answer)
- 8080
Correct answer: 443
HTTPS (HTTP Secure) uses port 443 by default to provide encrypted web communication via TLS/SSL.
Question 46: Which of the following statements about the use of an array is false?
- There are chances of wastage of memory space if elements inserted in an array are lesser than the allocated size
- Fixed size
- Insertion based on position
- Accessing elements at specified positions (Correct answer)
Correct answer: Accessing elements at specified positions
Arrays are highly efficient for accessing elements at specified positions using their index, which takes constant time (O(1)). This is a primary advantage and a fundamental 'use' of arrays, making the statement true. The question asks for a *false* statement about array use; therefore, 'accessing elements at specified positions' is the correct answer because it is a *true* and beneficial aspect, unlike the other options which describe limitations or potential drawbacks.
Question 47: What is the key advantage of using a Harvard architecture over a von Neumann architecture in embedded processors?
- Simpler control unit design
- Better floating-point performance
- Larger address space
- Simultaneous instruction fetch and data memory access (Correct answer)
Correct answer: Simultaneous instruction fetch and data memory access
Harvard architecture uses separate buses for instructions and data, allowing the CPU to fetch the next instruction while reading or writing data in the same cycle.
Question 48: The Power Spectral Density (PSD) of a signal describes:
- How signal power is distributed across different frequencies (Correct answer)
- The phase angle of each frequency component
- The total energy of a deterministic finite-duration signal
- The instantaneous power at each moment in time
Correct answer: How signal power is distributed across different frequencies
The PSD, obtained as the Fourier Transform of the autocorrelation function, shows how the average power of a signal is spread over its frequency components.
Question 49: The processor is considered to have _____ if an exception is thrown and the subsequent instructions are fully executed.
- None of the mentioned
- Exception handling
- Generation word
- Imprecise exceptions (Correct answer)
Correct answer: Imprecise exceptions
An imprecise exception occurs when an exception is thrown, but the processor continues to execute subsequent instructions before handling the exception. This means that the exact instruction that caused the exception might not be immediately identifiable. The state of the processor when the exception is detected may not accurately reflect the state at the time of the fault, complicating error recovery and debugging.
Question 50: How long does it take to count all the elements in the linked list?
- O(n2)
- O(logn)
- O(n) (Correct answer)
- O(1)
Correct answer: O(n)
To count all the elements in a linked list, you must traverse the entire list from the head node to the tail node. This involves visiting each node exactly once to increment a counter. Therefore, the time complexity for this operation is directly proportional to the number of elements 'n' in the list, resulting in O(n) time.
Question 51: What is the Boolean identity of A + A'?
- 0
- A
- 1 (Correct answer)
- A'
Correct answer: 1
A OR NOT-A is always 1 by the complement law, because one of A or A' must always be true.
Question 52: What is the worst-case time complexity of QuickSort?
- O(n)
- O(log n)
- O(n²) (Correct answer)
- O(n log n)
Correct answer: O(n²)
QuickSort degrades to O(n²) when the pivot consistently selects the smallest or largest element (e.g., sorted input).
Question 53: Which type of programmable logic device uses a fixed AND array and programmable OR array?
- CPLD
- PLA (Programmable Logic Array)
- FPGA
- PAL (Programmable Array Logic) (Correct answer)
Correct answer: PAL (Programmable Array Logic)
A PAL (Programmable Array Logic) has a programmable AND array feeding a fixed OR array, offering simpler and faster implementation than a PLA.
Question 54: In a full adder, how many inputs does it have?
- 2
- 3 (Correct answer)
- 4
- 1
Correct answer: 3
A full adder has three inputs: two significant bits (A and B) and a carry-in (Cin), producing a Sum and a Carry-out.
Question 55: What is the function of a decoder in digital logic?
- Convert an n-bit binary input into one of 2^n output lines (Correct answer)
- Store and retrieve binary data
- Add two binary numbers
- Compress multiple inputs into fewer outputs
Correct answer: Convert an n-bit binary input into one of 2^n output lines
A decoder takes n binary input lines and activates exactly one of its 2^n output lines based on the binary value of the input.
Question 56: What is the correct way to open a file for both reading and writing in binary mode in C?
- fopen("file", "w+")
- fopen("file", "r+b") (Correct answer)
- fopen("file", "rw")
- fopen("file", "rb")
Correct answer: fopen("file", "r+b")
The mode `"r+b"` opens an existing binary file for both reading and writing without truncating it.
Question 57: Which IP address class supports up to 254 hosts per network?
- Class A
- Class D
- Class B
- Class C (Correct answer)
Correct answer: Class C
Class C addresses use 24 bits for the network and 8 bits for the host, supporting up to 254 usable host addresses.
Question 58: What is the purpose of a multiplexer (MUX) in digital circuits?
- Convert analog to digital signals
- Amplify digital signals
- Store a single bit of data
- Select one of many input signals and forward it to a single output (Correct answer)
Correct answer: Select one of many input signals and forward it to a single output
A multiplexer selects one of several input lines based on select signals and routes it to a single output line.
Question 59: Which of the following statements regarding the address bus is false?
- It consists of control PIN 21 to 28
- It is 16 bits in length
- Lower address bus lines (AD0 – AD7) are called “Line number”
- It is a bidirectional bus (Correct answer)
Correct answer: It is a bidirectional bus
The address bus is fundamentally a unidirectional bus. Its sole purpose is to transmit memory addresses from the CPU to memory or I/O devices, indicating where data should be read from or written to. Data buses are bidirectional, but address buses only carry information in one direction (out from the CPU).
Question 60: Which type of programmable logic device allows the user to configure both the AND and OR planes?
- ROM
- CPLD
- PLA (Correct answer)
- PAL
Correct answer: PLA
A PLA (Programmable Logic Array) has both a programmable AND plane and a programmable OR plane, offering the most flexibility for implementing sum-of-products expressions.
Question 61: Which layer of the OSI model is responsible for end-to-end communication and error recovery?
- Session Layer
- Transport Layer (Correct answer)
- Network Layer
- Data Link Layer
Correct answer: Transport Layer
The Transport Layer (Layer 4) provides end-to-end communication, error recovery, and flow control between hosts.
Question 62: Which collision resolution technique for hash tables stores all colliding elements in a linked list at the same bucket?
- Open addressing
- Linear probing
- Double hashing
- Separate chaining (Correct answer)
Correct answer: Separate chaining
Separate chaining stores multiple elements mapping to the same hash value in a linked list at that index.
Question 63: In object-oriented programming, what exactly is an abstraction?
- Hiding the important data
- Hiding the implementation
- Hiding the implementation and showing only the features (Correct answer)
- Showing the important data
Correct answer: Hiding the implementation and showing only the features
Abstraction in OOP focuses on showing only essential information to the user and hiding the complex implementation details. It allows you to define the 'what' an object does without revealing the 'how' it does it. This simplifies the system's view, making it easier to manage and understand, and allows for changes in implementation without affecting the external interface.
Question 64: In a B-tree of order m, what is the maximum number of keys a single node can hold?
- m
- m - 1 (Correct answer)
- 2m
- m + 1
Correct answer: m - 1
A B-tree node of order m can hold at most m - 1 keys and m children.
Question 65: Which of the following best describes a continuous-time signal?
- A signal defined for all real values of time (Correct answer)
- A signal defined only at integer time instants
- A signal with finite energy and finite duration
- A signal that takes only discrete amplitude values
Correct answer: A signal defined for all real values of time
A continuous-time signal is defined for every real value of t, distinguishing it from discrete-time signals that are defined only at integer time instants.
Question 66: What does ACID stand for in database transactions?
- Atomicity, Concurrency, Integrity, Distribution
- Availability, Concurrency, Isolation, Distribution
- Atomicity, Consistency, Isolation, Durability (Correct answer)
- Availability, Consistency, Integrity, Durability
Correct answer: Atomicity, Consistency, Isolation, Durability
ACID stands for Atomicity, Consistency, Isolation, and Durability, four properties that guarantee reliable database transactions.
Question 67: What is a race condition in a sequential logic circuit?
- When a flip-flop is stuck at logic 0
- When two clocks run at different frequencies
- When multiple signal paths have different delays causing unpredictable outputs (Correct answer)
- When a counter overflows its maximum count
Correct answer: When multiple signal paths have different delays causing unpredictable outputs
A race condition occurs when signals propagate through different path lengths and arrive at a gate at slightly different times, potentially causing incorrect or glitchy outputs.
Question 68: Which synchronization construct guarantees that only one thread executes a protected block at a time and automatically releases on exit, including via exceptions?
- Monitor (Correct answer)
- Counting semaphore
- Barrier
- Spinlock
Correct answer: Monitor
A monitor encapsulates shared data with mutual exclusion and condition variables, automatically releasing the lock when the thread exits the protected procedure.
Question 69: Which data structure is used to implement function call management in most programming languages?
- Heap
- Stack (Correct answer)
- Queue
- Graph
Correct answer: Stack
The call stack uses LIFO ordering so that the most recently called function is the first to return.
Question 70: What is the name of a linear collection of data pieces where the linear node is indicated by a pointer?
- Node list
- Linked list (Correct answer)
- Unordered list
- Primitive list
Correct answer: Linked list
A linked list is a linear collection of data elements, called nodes, where each node contains both data and a pointer (or reference) to the next node in the sequence. This pointer-based structure allows elements to be stored non-contiguously in memory. Unlike arrays, linked lists do not require contiguous memory allocation and can grow or shrink dynamically.
Question 71: What is denormalization in database design?
- Removing all indexes from a table
- Splitting a table into smaller tables
- Converting all relations to 3NF
- Intentionally adding redundancy to improve read performance (Correct answer)
Correct answer: Intentionally adding redundancy to improve read performance
Denormalization intentionally introduces redundancy into a normalized database to reduce joins and speed up read-heavy queries.
Question 72: What will the following C code produce as its output?
- 10 20
- 10
- Undefined value
- Compile time error (Correct answer)
Correct answer: Compile time error
Without the actual C code, it's impossible to pinpoint the exact reason for a compile-time error. However, common causes for compile-time errors in C include syntax mistakes (e.g., missing semicolons, mismatched parentheses), undeclared variables or functions, type mismatches in assignments or function calls, or incorrect use of operators. The compiler detects these issues before the program can even run.
Question 73: Which Boolean theorem states that A + A = A and A AND A = A?
- Idempotent Law (Correct answer)
- Distributive Law
- Complement Law
- Absorption Law
Correct answer: Idempotent Law
The Idempotent Law states that ORing or ANDing a variable with itself returns the same variable: A+A=A and A.A=A.
Question 74: What is the term for the condition where a process holds one resource and waits for another held by a second process, which in turn waits for the first?
- Starvation
- Deadlock (Correct answer)
- Livelock
- Race condition
Correct answer: Deadlock
Deadlock occurs when two or more processes are each waiting for a resource held by another, forming a circular wait with no progress possible.
Question 75: Another name for circular queue is
- Curve Buffer
- Rectangle Buffer
- Square Buffer
- Ring Buffer (Correct answer)
Correct answer: Ring Buffer
A circular queue is a linear data structure where the last element points back to the first element, forming a circle. This arrangement allows for efficient reuse of empty slots, preventing the need to shift elements after deletions. It is also commonly known as a 'Ring Buffer' due to its circular nature and buffering capabilities.
Question 76: What is a double linked list that uses little memory?
- A doubly linked list that uses bitwise AND operator for storing addresses
- The list has breakpoints for faster traversal
- An auxiliary singly linked list acts as a helper list to traverse through the doubly linked list
- Each node has only one pointer to traverse the list back and forth (Correct answer)
Correct answer: Each node has only one pointer to traverse the list back and forth
A memory-efficient doubly linked list, often called an XOR linked list, achieves its efficiency by storing only one pointer in each node. Instead of separate 'next' and 'previous' pointers, it stores the bitwise XOR of the addresses of the previous and next nodes. This allows traversal in both directions by using the address of the current node and the XOR sum to deduce the address of the other adjacent node, effectively reducing memory overhead.
Question 77: Which logic gate produces an output of 1 only when all inputs are 1?
- XOR gate
- NAND gate
- AND gate (Correct answer)
- OR gate
Correct answer: AND gate
An AND gate outputs 1 (HIGH) only when all of its inputs are simultaneously 1; otherwise it outputs 0.
Question 78: The term "linear list" refers to a collection of elements where deletions may only be made from one end (front) and insertions can only be made from the other end (rear).
- Linked list
- Stack
- Queue (Correct answer)
- Tree
Correct answer: Queue
A queue is a linear data structure that follows the First-In, First-Out (FIFO) principle. Elements are always added at one end, called the 'rear' (enqueue operation), and removed from the other end, called the 'front' (dequeue operation). This behavior perfectly matches the description of deletions only from the front and insertions only from the rear.
Question 79: In virtual memory systems, what structure maps virtual page numbers to physical frame numbers?
- TLB
- Segment table
- Page table (Correct answer)
- Inverted page table
Correct answer: Page table
The page table maintained per-process translates virtual page numbers into the corresponding physical frame numbers for address translation.
Question 80: In a TCP three-way handshake, what is the correct sequence of messages?
- SYN, ACK, SYN-ACK
- SYN-ACK, SYN, ACK
- ACK, SYN, SYN-ACK
- SYN, SYN-ACK, ACK (Correct answer)
Correct answer: SYN, SYN-ACK, ACK
A TCP connection starts with SYN from the client, SYN-ACK from the server, and a final ACK from the client.
Question 81: In the context of microprocessor reset, what is the state of the program counter immediately after a cold reset on most RISC processors?
- It points to address 0x0000 always
- It is loaded from a fixed reset vector address defined by the architecture (Correct answer)
- It is set to the top of the stack
- It retains its last value before reset
Correct answer: It is loaded from a fixed reset vector address defined by the architecture
On reset, most RISC processors load the program counter from a predefined reset vector (e.g., 0xFFFFFFFC on ARM Cortex-M) specified by the architecture.
Question 82: In a full adder, how many inputs does it take?
- 1
- 4
- 2
- 3 (Correct answer)
Correct answer: 3
A full adder takes three inputs: two significant bits (A and B) and a carry-in (Cin), producing a sum and carry-out.
Question 83: What is memoization in the context of dynamic programming?
- Breaking a problem into independent subproblems
- Sorting results before storing them
- Caching the results of subproblems in a table to avoid recomputation (Correct answer)
- Choosing locally optimal solutions at each step
Correct answer: Caching the results of subproblems in a table to avoid recomputation
Memoization is a top-down DP technique where computed subproblem results are stored (usually in a hash map or array) so they can be retrieved instantly if needed again.
Question 84: What is the maximum transmission unit (MTU) for standard Ethernet?
- 1024 bytes
- 9000 bytes
- 1500 bytes (Correct answer)
- 512 bytes
Correct answer: 1500 bytes
Standard Ethernet has an MTU of 1500 bytes, meaning frames carrying more data must be fragmented.
Question 85: What is the hexadecimal representation of the binary number 11110000?
- EF
- F0 (Correct answer)
- E0
- 0F
Correct answer: F0
Splitting 11110000 into two nibbles: 1111 = 0xF and 0000 = 0x0, so the result is 0xF0.
Question 86: Which field in an IPv4 header prevents packets from circulating indefinitely on a network?
- Flags
- Time to Live (TTL) (Correct answer)
- Checksum
- Fragment Offset
Correct answer: Time to Live (TTL)
The TTL field is decremented by each router; when it reaches zero, the packet is discarded to prevent infinite loops.
Question 87: The ____ technique is used by the VLIW architecture to create parallelism.
- SIMD
- MIMD (Correct answer)
- SISD
- MISD
Correct answer: MIMD
VLIW (Very Long Instruction Word) architecture achieves parallelism by packing multiple independent operations into a single, very long instruction. This allows multiple functional units to execute these operations simultaneously. This approach aligns with the MIMD (Multiple Instruction, Multiple Data) paradigm, where different instructions operate on different data streams concurrently.
Question 88: Which of the following is NOT a property of a Red-Black Tree?
- All leaves (NIL) are black
- No two consecutive red nodes exist on any path
- The root is always black
- All paths from a node to leaves must have equal total nodes (Correct answer)
Correct answer: All paths from a node to leaves must have equal total nodes
Red-Black Trees require equal numbers of BLACK nodes on all paths to leaves, not equal total nodes.
Question 89: Which protocol is responsible for converting domain names to IP addresses?
- ICMP
- DNS (Correct answer)
- ARP
- DHCP
Correct answer: DNS
DNS (Domain Name System) translates human-readable domain names into their corresponding IP addresses.
Question 90: Which programming language was the first to focus solely on objects?
- Java
- C++
- Kotlin
- SmallTalk (Correct answer)
Correct answer: SmallTalk
Smalltalk, developed by Alan Kay and his team in the 1970s, was the first programming language to fully embrace and implement the object-oriented paradigm, where everything is an object. While Simula introduced object-oriented concepts earlier, Smalltalk was designed from the ground up with a pure object model, making it a foundational language for OOP.
Question 91: What does the acronym TCP stand for in networking?
- Transfer Control Protocol
- Terminal Communication Protocol
- Transport Channel Protocol
- Transmission Control Protocol (Correct answer)
Correct answer: Transmission Control Protocol
TCP stands for Transmission Control Protocol, a connection-oriented protocol that ensures reliable data delivery.
Question 92: Which of the following designs does the IA-32 system adhere to?
- SIMD
- None of the above
- RISC
- CISC (Correct answer)
Correct answer: CISC
The IA-32 (Intel Architecture, 32-bit) instruction set, commonly associated with Intel x86 processors, adheres to the CISC (Complex Instruction Set Computer) design philosophy. CISC architectures feature a large and complex set of instructions, some of which can perform multiple operations in a single instruction. This design allows for more compact code but can lead to variable instruction execution times.
Question 93: In a circular linked list, what distinguishes it from a standard singly linked list?
- Elements are stored in sorted order
- Memory is allocated on the stack
- Nodes store two pointers instead of one
- The last node points back to the first node (Correct answer)
Correct answer: The last node points back to the first node
In a circular linked list, the tail node's next pointer points back to the head, forming a cycle.
Question 94: What is the main advantage of a skip list over a balanced BST?
- No need for comparison operations
- Simpler concurrent implementation (Correct answer)
- Lower memory usage
- Better worst-case time complexity
Correct answer: Simpler concurrent implementation
Skip lists are easier to implement in concurrent settings because they don't require complex rebalancing operations.
Question 95: What is the purpose of a NAT (Network Address Translation) device?
- Translate private IP addresses to public IP addresses (Correct answer)
- Assign MAC addresses to devices
- Filter traffic by application type
- Encrypt data between networks
Correct answer: Translate private IP addresses to public IP addresses
NAT translates private (internal) IP addresses to a public IP address, allowing multiple devices to share a single public IP.
Question 96: In a superscalar processor, a structural hazard occurs when:
- An instruction reads a register written by an earlier unfinished instruction
- Two instructions need the same hardware resource in the same cycle (Correct answer)
- A branch destination is not yet known
- An instruction is fetched from an incorrect address
Correct answer: Two instructions need the same hardware resource in the same cycle
Structural hazards arise from resource conflicts, such as two instructions simultaneously requiring a single-ported memory or a single multiply unit.
Question 97: In the context of algorithms, what is a 'divide and conquer' strategy?
- Break the problem into smaller subproblems, solve each recursively, and combine results (Correct answer)
- Randomly sample solutions and pick the best one
- Solve a simpler version of the problem and adjust
- Solve the problem greedily and verify the solution
Correct answer: Break the problem into smaller subproblems, solve each recursively, and combine results
Divide and conquer recursively splits a problem into subproblems, solves them independently, and combines their solutions, as seen in merge sort and binary search.
Question 98: Which branch prediction strategy uses a two-bit saturating counter to reduce mispredictions on loops?
- Two-bit predictor (Correct answer)
- BTB-only prediction
- One-bit predictor
- Static always-taken
Correct answer: Two-bit predictor
A two-bit saturating counter must mis-predict twice before changing state, making it more stable for loop branches than a one-bit scheme.
Question 99: What is the purpose of a software requirements specification (SRS) document?
- Describe the physical architecture of the system
- Define the project schedule and budget
- Document post-deployment maintenance procedures
- Provide a detailed description of the software's functions, performance, and constraints (Correct answer)
Correct answer: Provide a detailed description of the software's functions, performance, and constraints
An SRS document formally describes what a software system should do, serving as a contract between stakeholders and developers.
Question 100: In a virtual memory system with a two-level page table, how many memory accesses are needed for a TLB-miss page walk before the data access?
- 4
- 2 (Correct answer)
- 3
- 1
Correct answer: 2
A two-level page table requires one access to the page directory and one to the page table entry before the actual data address is resolved.
CCpE - Certified Computer Engineer (B CompE Bachelor of Computer Engineering)
The Certified Computer Engineer (CCpE) certification by the Computer Engineering Certification Board of the Philippines (CpECB) validates knowledge in core computer engineering disciplines including digital logic, algorithms, computer networks, and software engineering for BSCpE graduates.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds