Memory Based Question-2082

NEC LICENCE EXAM- COMPUTER ENGINEERING

MEMORY BASED QUESTIONS -2082

Data Structures

  1. Which data structure is best suited for implementing recursion?
    a) Queue
    b) Stack
    c) Linked List
    d) Tree


Answer: b) Stack
 

  1. The time complexity of binary search is:
    a) O(n)
    b) O(log n)
    c) O(n log n)
    d) O(n²)
     

Answer: b) O(log n)
 

  1. Which sorting algorithm is not comparison-based?
    a) Quick Sort
    b) Merge Sort
    c) Counting Sort
    d) Heap Sort
     

Answer: c) Counting Sort
 

  1. In a B-tree of order m, a node can have at most:
    a) m keys and m children
    b) m–1 keys and m children
    c) m keys and m–1 children
    d) m+1 keys and m children
     

Answer: b) m–1 keys and m children
 

  1. Which hashing technique resolves collisions by linking all elements in the same slot?
    a) Linear probing
    b) Quadratic probing
    c) Chaining
    d) Double hashing
     

 Answer: c) Chaining
 

Computer Networks

  1. Which protocol is used for sending email?
    a) SMTP
    b) FTP
    c) HTTP
    d) SNMP
     

Answer: a) SMTP
 

  1. Which of the following is a connection-oriented protocol?
    a) UDP
    b) TCP
    c) IP
    d) ICMP
     

Answer: b) TCP
 

  1. In the OSI model, routing is performed at which layer?
    a) Transport
    b) Network
    c) Data Link
    d) Session
     

Answer: b) Network
 

  1. The address resolution protocol (ARP) is used to:
    a) Map IP to MAC address
    b) Map MAC to IP address
    c) Translate domain names
    d) Encrypt packets
     

Answer: a) Map IP to MAC address
 

  1. Which IP class supports up to 254 hosts per network?
    a) Class A
    b) Class B
    c) Class C
    d) Class D
     

Answer: c) Class C

 

Operating Systems

  1. Which of the following is a non-preemptive scheduling algorithm?
    a) Round Robin
    b) FCFS
    c) SJF (preemptive)
    d) Priority (preemptive)
     

Answer: b) FCFS
 

  1. A deadlock can be prevented by:
    a) Circular wait
    b) Resource preemption
    c) Mutual exclusion
    d) Hold and wait
     

Answer: b) Resource preemption
 

  1. In virtual memory, the mapping from virtual address to physical address is maintained by:
    a) Cache
    b) Page table
    c) Segment table
    d) TLB
     

 Answer: b) Page table
 

  1. The thrashing problem in OS is related to:
    a) CPU scheduling
    b) Memory management
    c) File management
    d) I/O buffering
     

Answer: b) Memory management
 

  1. Which system call is used in UNIX to create a new process?
    a) exec()
    b) fork()
    c) wait()
    d) exit()
     

 Answer: b) fork()
 

Programming & OOP

  1. In C++, which of the following cannot be overloaded?
    a) +
    b) =
    c) ::
    d) []
     

Answer: c) ::
 

  1. In C, malloc() returns:
    a) void pointer
    b) int pointer
    c) null pointer
    d) float pointer
     

Answer: a) void pointer
 

  1. Which of the following is an abstract class in Java?
    a) A class with private members
    b) A class with no objects instantiated
    c) A class with pure virtual functions
    d) A final class
     

Answer: c) A class with pure virtual functions
 

  1. The default return type of main() in C is:
    a) void
    b) int
    c) float
    d) none
     

Answer: b) int
 

  1. In C++, if a base class has a virtual function and a derived class overrides it, the call is resolved at:
    a) Compile time
    b) Run time
    c) Link time
    d) Pre-processing
     

 Answer: b) Run time
 

 

Database Systems

  1. Which normal form eliminates transitive dependency?
    a) 1NF
    b) 2NF
    c) 3NF
    d) BCNF
     

Answer: c) 3NF
 

  1. SQL command used to remove a relation from a database:
    a) DELETE
    b) REMOVE
    c) DROP
    d) ERASE
     

Answer: c) DROP
 

  1. The ACID property of DBMS ensures:
    a) Accuracy, Control, Integrity, Dependency
    b) Atomicity, Consistency, Isolation, Durability
    c) Access, Consistency, Integrity, Dependability
    d) None of the above
     

Answer: b) Atomicity, Consistency, Isolation, Durability
 

  1. The result of a Cartesian product of two relations R and S with m and n tuples is:
    a) m + n
    b) m × n
    c) m – n
    d) m / n
     

Answer: b) m × n
 

  1. The primary key in a relational database:
    a) Can be NULL
    b) Must be unique and not NULL
    c) Can be duplicated
    d) Is optional
     

 Answer: b) Must be unique and not NULL
 

Digital Logic & Architecture

  1. The binary representation of –7 in 8-bit 2’s complement is:
    a) 11111001
    b) 00000111
    c) 10000111
    d) 11110001
     

 Answer: a) 11111001
 

  1. In microprocessors, the non-maskable interrupt (NMI) is:
    a) RST 5.5
    b) RST 7.5
    c) RST 6.5
    d) TRAP
     

 Answer: d) TRAP
 

  1. The control unit of a computer is responsible for:
    a) Performing arithmetic operations
    b) Storing data
    c) Directing the flow of instructions
    d) Handling I/O devices
    Answer: c) Directing the flow of instructions
     
  2. A system with 32-bit address bus can address up to:
    a) 2^16 bytes
    b) 2^20 bytes
    c) 2^32 bytes
    d) 2^64 bytes
     

Answer: c) 2^32 bytes
 

  1. The instruction MOV AX, BX in 8086 is an example of:
    a) Data transfer instruction
    b) Arithmetic instruction
    c) Logical instruction
    d) Branch instruction
     

Answer: a) Data transfer instruction