Basic Computer Engineering MCQs

Hello Friends !!! I am from quickstudyhelper.com. In today’s post, we are going to see very important ‘Basic Computer Engineering MCQs’ which help you in your examination. If you are preparing for a competition exam, board exam, and engineering exam then you can read these MCQs.

In this post, you will see some Algorithms MCQs, Data Structure MCQs, and C Programming MCQs.

Basic Computer Engineering MCQs (Algorithms MCQs, Data Structure MCQs, and C Programming MCQs)

Q1. Why is an array used?

  1. can store very large numbers of records efficiently
  2. used to store a collection of data
  3. is a step-by-step procedure for calculations
  4. none of these

Answer: – 2) used to store a collection of data

Q2.  A data structure that follows the FIFO principle.

  1. Queue
  2. Link list
  3. Stack
  4. Union

Answer :-  1) Queue

Q3. Another name for 1-D arrays.

  1. Linear arrays
  2. Lists
  3. Horizontal array
  4. Vertical array

Answer:- 1) Linear arrays

Q4. When an algorithm is written in the form of a programming language, it becomes a _________

  1. flowchart
  2. program
  3. pseudo code
  4. syntax

Answer:- 2) program

Q5 The time that depends on the input: an already sorted sequence that is easier to sort.

  1. Process
  2. Evaluation
  3. Running
  4. Input

Answer:- 3) Running

Q6 This characteristic often draws the line between what is feasible and what is impossible.

  1. Performance
  2.  System Evaluation
  3.  Modularity
  4. Reliability

Answer:- 1) Performance

Q7Which of the following comment is correct when a macro definition includes arguments

  1. The opening parenthesis should immediately follow the macro name.
  2. There should be at least one blank between the macro name and the opening parenthesis.
  3. There should be only one blank between the macro name and the opening parenthesis.
  4. All the above comments are correct.

Answer:- 1) The opening parenthesis should immediately follow the macro name.

Q8What is required in each C program?

  1. The program must have at least one function.
  2. The program does not require any function.
  3. Input data
  4. Output data

Answer:- 1) The program must have at least one function.

Q9What is a lint?

  1. C compiler
  2. Interactive debugger
  3. Analyzing tool
  4. C interpreter

Answer:- 3) Analyzing tool

Q10  Why is a macro used in place of a function?

  1. It reduces execution time.
  2. It reduces code size.
  3. It increases execution time.
  4. It increases code size

Answer:- 2) It reduces code size.

Q11  In the C language, the constant is defined _______.

  1. Before main
  2. After main
  3. Anywhere, but starting on a new line.
  4. None of the these

Answer:- 3) Anywhere but starting on a new line.

Q12  Which one of the following is a loop construct that will always be executed once?

  1. For
  2. While
  3. Switch
  4. Do while

Answer:- 4) Do while

Q13 Which of the following best describes the ordering of destructor calls for stack-resident objects in a routine?

  1. The first object created is the first object destroyed; last created is last destroyed.
  2. The first object destroyed is the last object destroyed; last created is first destroyed.
  3. Objects are destroyed in the order they appear in memory, the object with the lowest memory address is destroyed first.
  4. The order is undefined and may vary from compiler to compiler.

Answer:- 2)The first object destroyed is the last object destroyed; the last created is first destroyed.

Q14  Directives are translated by the

  1. Pre-processor
  2. Compiler
  3. Linker
  4. Editor

Answer:-  1) Pre-processor

Q15 What feature makes C++ so powerful?

  1. Easy implementation
  2. Reusing the old code
  3. Easy memory management
  4. All of the above

Answer:- 4) All of above

Q16  Each instance of a class has a different set of

  1. Class interfaces
  2. Methods
  3. Return types
  4. Attribute values

Answer:- 4) Attribute values

Q17 How many instances of a class can be declared?

  1. 1
  2. 10
  3. As per required
  4. None of the these

Answer:- 3) As per required

Q18 Which of the following statement is not true?

  1. A pointer to an int and a pointer to a double are of the same size.
  2. A pointer must point to a data item on the heap (free store).
  3. A pointer can be reassigned to point to another data item.
  4. A pointer can point to an array.

 Answer 2)  A pointer must point to a data item on the heap (free store).

Q19Which of the following SLT template class is a container adaptor class?

  1. Stack
  2. List
  3. Deque
  4. Vector

Answer:- 1) Stack

Q20 What kinds of iterators can be used with vectors?

  1. Forward iterator
  2. Bi-directional iterator
  3. Random access iterator
  4. All of the above

Answer:- 4) All of  above

Q21The following statements are about EOF. Which of them is true?

  1. Its value is implementation dependent
  2. Its value can be negative
  3. Its value should not equal the integer equivalent of any character
  4. All of these

Answer:- 4) All of these

Q16Who invented C Language.?

  1. Charles Babbage
  2. Grahambel
  3.  Dennis Ritchie
  4. Steve Jobs

Answer:- 3) Dennis Ritchie

Q17High level language is a .?

  1. Human readable like language.
  2. language with small program size.
  3. language with big program size.
  4. language which is difficult to understand and not human readable.

Answer:- 1) Human-readable like language

Q18  Which of the following is not an operating system?

  1. Windows
  2. Linux
  3. Oracle
  4. DOS

Answer:- 3) Oracle

Q19  What is the maximum length of the filename in DOS?

  1. 4
  2. 5
  3. 8
  4. 12

Answer:- 3) 8

Q20 When was the first operating system developed?

  1. 1948
  2. 1949
  3. 1950
  4. 1951

Answer:- 3) 1950

Q21  When were MS windows operating systems proposed?

  1. 1994
  2. 1990
  3. 1992
  4. 1985

Answer :- 4)  1985

Q22What is the full name of FAT?

  1. File attribute table
  2. File allocation table
  3. Font attribute table
  4. Format allocation table

Answer:- 2) File allocation table

Q23 BIOS is used?

  1. By operating system
  2. By compiler
  3. By interpreter
  4. By application software

Answer:- 1) By operating system

Q24  When does page fault occur?

  1. The page is present in memory.
  2. The deadlock occurs.
  3. The page does not present in memory.
  4. The buffering occurs.

Answer:- 3) The page does not present in memory.

Q25  When you delete a file on your computer, where does it go?

  1. Recycle bin
  2. Hard disk
  3. Taskbar
  4. None of these

Answer:- 1) Recycle bin

Q26 Where are placed the list of processes that are prepared to be executed and waiting?

  1. Job queue
  2. Ready queue
  3. Execution queue
  4. Process queue

Answer:- 2) Ready queue

Q27 Who among the following can block the running process?

  1. Fork
  2. Read
  3. Down
  4. All of these

Answer:- 4)  All of these

Q28 What is the Microsoft window?

  1. Operating system
  2. Graphics program
  3. Word Processing
  4. Database program

Answer:- 1) Operating system 

Q29  Which of the following is a group of programs?

  1. Accessories
  2. Paint
  3. Word
  4. All of above

Answer:- 1) Accessories

Q30  Which of the following is an example of a Real-Time Operating System?

  1. MAC
  2. MS-DOS
  3. Windows 10
  4. Process Control

Answer:-  4)  Process Control

Q31 Which type of commands is required to perform various tasks in DOS?

  1. Internal commands
  2. External commands
  3. Valuable commands
  4. Primary commands

Answer:- 2) External commands

Q32  Which of the following is system software?

  1. Operating system
  2. Compiler
  3. Utilities
  4. All of the above

Answer:- 4) All of the above

Q33 Full From of CPU?

  1. Control Processing unit
  2. Processing unit
  3. Central processing unit
  4. None of these

Answer :- 3) Central processing unit

Q34 Main Types of operating system?

  1. 3
  2. 4
  3. 6
  4. 5

Answer:- 2) 4

Q35 how many types of inheritance?

  1. 2
  2. 3
  3. 4
  4. 5

Answer:-  4) 5

Q36 Which inheritance is java does not support?

  1. Multilevel inheritance
  2. Single inheritance
  3. Multiple inheritance
  4. None  of these

Answer:- 3)  Multiple inheritance

Q37 POP work on the concept?

  1. Top down
  2. Bottom up
  3. Left  right
  4. Right left

Answer :- 1) Top-down

Q38  Which type of variable does not inherit in another class?

  1. Public variable
  2. Private variable
  3. Numerical variable
  4. All of these

Answer:- 2) Private variable

Q39 What is class?

  1. Predefined data type
  2. User defined Data type
  3. A Keyword
  4. None of these

Answer:- 2) User-defined data type

Q40Keyword is?

  1. Predefined word
  2. User defined word
  3. Both
  4. None of these

Answer:- 1) Predefined word

Q41C Language support inheritance?

  1. Multiple inheritance
  2. Multilevel inheritance
  3. Single inheritance
  4. No inheritance

Answer:- 4) No inheritance

Q42 Which type of files generate C and C++ language?

  1. .exe files
  2. .class files
  3. .doc files
  4. None of these

Answer:- 1).exe files

Q43 Which types of files are generated by Java?

  1. .exe files
  2. .class files
  3. .doc files
  4. None of these

Answer:- 2) .class files

Q44 How many keywords are supported by Java?

  1. 63
  2. 32
  3. 56
  4. 50

Answer:- 4) 50

Q45 C++ developed by

  1. Bjarne stroustrup
  2. Dennis Ritchie
  3. JaynesGosling
  4. None of these

Answer:- 1) Bjarne Stroustrup

Q46. Which of the following is not correct for virtual function in C++ ?.

  1. Virtual function can be static.
  2. Virtual function should be accessed using pointers
  3. Virtual function is defined in base class
  4. Must be declared in public section of class

Answer:- 1) Virtual function can be static.

Q47. How many specifiers are present in access specifiers in class?

  1. 1
  2. 2
  3. 3
  4. 4

Answer:- 3) 3

Q48. Which of these following members are not accessed by using direct member access operator?

  1. Public
  2. Private
  3. Protected
  4. Both 1 & 2

Answer:- 4) Both 1 & 2

Q49. Which is also called as abstract class?

  1. Virtual function
  2. Derived class
  3. Pure virtual function
  4. None of them

Answer:- 3) Pure virtual function

Q50. Guess the output of following C++ program

#include<iostream>

using namespace std;

class Empty { };

int main( )

{

    cout  << sizeof( Empty );

        return 0;

}

  1. A non-zero value
  2. 0
  3. Compiler Error
  4. Runtime Error

Answer:- 1) A non-zero value

Q51. A member function can always access the data in ____

  1. The object of which it is a member
  2. The class of which it is member
  3. The public part of its class
  4. The private part of its class

Answer:- 2) The class of which it is member

Q52. What does a class in C++ holds?

  1. Data
  2. Function
  3. Arrays
  4. Both 1 & 2

Answer:- 4) Both 1 & 2

Q53. Which of the following is a valid class declaration?

  1. class A { int x; };
  2. class B { }
  3. public class A { }
  4. object A { int x; };

Answer:- 1) class A { int x; };

Q54. Which among the following best describes member functions?

  1. Functions which are defined within the class
  2. Functions belonging a class
  3. Functions in public access of a class
  4. Functions which are private to class

Answer:- 2) Functions belonging a class

Q55. How many types of member functions are generally there in C++?

  1. 2
  2. 3
  3. 4
  4. 5

Answer:- 4) 5

Q56. Member functions of a generic class are ____

  1. Not generic
  2. Automatically generic
  3. To be made generic explicitly
  4. Given default type as double

Answer:- 2) Automatically generic

Q57. A member function can _____ of the same class.

  1. Call only private member functions
  2. Call only static member functions
  3. Call only constant member functions
  4. Call other member functions

Answer:- 4) Call other member functions

Q58. Only the ____ can have access to private members and private functions

  1. data functions
  2. inline functions
  3. member functions
  4. member variables

Answer:- 3) member functions

Q59. A __ can only be called by another function that is a member of its class.

  1. constant member function
  2. private member function
  3. static member function
  4. friend function

Answer:- 3) private member function

Q60. If a member function does not alter any data in the class, that may be declared as ___

  1. constant member function
  2. private member function
  3. static member function
  4. friend function

Answer:- 1) constant member function

Q61. Which of the following is the correct syntax to add the header file in the C++ program?

  1. #include<userdefined>
  2. #include “userdefined.h”
  3. <include> “userdefined.h”
  4. Both A & B

Answer:- 4) Both A & B

Q62. Which of the following is the correct syntax for declaring the array?

  1. init array []
  2. int array [5];
  3. Array[5];
  4. None of the above

Answer:- 2) int array [5];

Q63. Which of the following gives the 4th element of the array?

  1. Array[0];
  2. Array[0];
  3. Array[3];
  4. None of the above

Answer:- 3) Array[3];

Q64. Which types of arrays are always considered as linear arrays?

  1. Single-dimensional
  2. Multi-dimensional
  3. Both A and B
  4. None of the above

Answer:- 1) Single-dimensional

Q65. Which of the header file is used for array type manipulation?

  1. <array>
  2. <type_traits>
  3. <iostream>
  4. std namespace

Answer:- 4) std namespace

Q66. What will be the output of the following C++ code?

#include <iostream>

#include <string>

using namespace std;

int main( )

{

    Cout<<extent<remove_all_extents<string [10] [20] [30]>: : type> : : v

    return 0 ;

}

  1. 20
  2. 10
  3. 0
  4. Error

Answer:- 3) 0

Q67. Which of the following functions/types of function cannot have default parameters?

  1. Member function of class
  2. Main( )
  3. Member function of structure
  4. Both B and C

Answer:- 2) Main( )

Q68. Which of the following in Object-Oriented Programming is supported by Function overloading and default arguments features of C++.

  1. Inheritance
  2. Polymorphism
  3. Encapsulation
  4. None of these

Answer:- 2) Polymorphism

Q69. Which of the following is the default return value of functions in C++?

  1. int
  2. char
  3. float
  4. void

Answer:- 1) int

Q70. An inline function is expanded during ___

  1. never expanded
  2. run-time
  3. compile-time
  4. end of the program

Answer:- 3) compile-time

Q71. Which of the following is important in a function?

  1. Return type
  2. Function name
  3. The return type, function name and parameter list
  4. Both return type and function name

Answer:- 4) Both return type and function name

Q72. Unary scope resolution operator is denoted by

  1. ! !
  2. % %
  3. :
  4. : :

Answer:- 4) : :

Q73. Which is the pointer which denotes the object calling the member function?

  1. Variable pointer
  2. This pointer
  3. Null pointer
  4. Zero pointer

Answer:- 2) This pointer

Q74. This pointer _____

  1. Are modifiable
  2. Can be assigned any value
  3. Are made variables
  4. Are non-modifiable

Answer:- 2) Can be assigned any value

Q75. Which among the following is/are type(s) of this pointer?

  1. const
  2. volatile
  3. const or volatile
  4. int

Answer:- 3) const or volatile

Q76. A pointer can be initialized with

  1. Null
  2. Zero
  3. Address of an object of same type
  4. All of the above

Answer:- 4) All of the above

Q77. How many types of constructors are there in C++?

  1. 1
  2. 2
  3. 3
  4. 4

Answer:- 3) 3

Q78. When destructors are called?

  1. when a program ends
  2. when a function ends
  3. when a delete operator is used
  4. all of the above

Answer:- 4) all of the above

Q79. Which of the following gets called when an object is being created?

  1. Constructor
  2. Virtual Function
  3. Destructors
  4. Main

Answer:- 1) Constructor

Q80. When the inheritance is private, the private methods in the base class are ____ in the derived class (in C++)

  1. Accessible
  2. Inaccessible
  3. Protected
  4. Public

Answer:- 2) Inaccessible

Q81. Does inheritance allow in C++ programs?

  1. Class Re-usability
  2. Creating a hierarchy of classes
  3. Extendibility
  4. All of the above

Answer:- All of the above

Q82. Which symbol is used to create multiple inheritance?

  1. .
  2. ,
  3. &
  4. %

Answer:- 2) ,

Q83. Which type of inheritance leads to the diamond problem?

  1. Single level
  2. Multi-level
  3. Multiple
  4. Hierarchical

Answer:- 3) Multiple

Q84. Which is the correct example of a binary operator?

  1. ++
  2. Dereferencing operator(*)
  3. +

Answer:- 4) +

Q85. Which is the correct example of a unary operator?

  1. &
  2. ==
  3. /

Answer:- 3) —

Q86. Which is called ternary operator?

  1. ?:
  2. &&
  3. |||
  4. ===

Answer:- 1) ?:

Q87. Which of the following operators cannot be overloaded

  1. Member Access or Dot operator
  2. Ternary or Conditional Operator
  3. Scope Resolution Operator
  4. All of the above

Answer:- 4) All of the above

Q88. Class is

  1. collection of similar elements
  2. collection of dissimilar elements
  3. combination of data members and member functions
  4. none of the above

Answer:-  3) combination of data members and member functions

Q89. Friend function can be defined in

  1. Private access mode
  2. Public access mode
  3. Protected access mode
  4. All of the above

Answer:- 4) All of the above

Q90. Which holds the address of an object?

  1. Class
  2. Friend function
  3. This pointer
  4. Private access specifier

Answer:- 3) This pointer

Q91. A class is called a container class of

  1. it cantain all the member function in public mode
  2. it contains the objects of another class as data members
  3. it contains another class inside
  4. it contains both the friend and the inline functions

Answer:- 2) it contains the objects of another class as data members

Q92. The only difference between a class and structure is that

  1. members are private in class and public on structure by default
  2. class can consist of data and member functions and structure consists data only
  3. we can specify different access modes in class, but in structure this is not possible
  4. all of the above

Answer:- 1) members are private in class and public on structure by default

Q93. The constructor can be declared in

  1. public mode
  2. private mode
  3. protected mode
  4. All the above

Answer:- 1) public mode

Q94. Constructor can return

  1. void data
  2. any data of user-defined types
  3. any data of built-in types
  4. No value

Answer:- 4) No value

Q95. Destructor is useful because

  1. it deallocates memory dynamically
  2. it release the memory occupied by an object
  3. it improves the speed of a program by reducing the number of statements in the source
  4. it supports data hiding

Answer:- 2) it release the memory occupied by an object

Q96. A virtual base class is generally used in

  1. Hierarchical inheritance
  2. Multiple inheritance
  3. Multi-level inheritance
  4. Hybrid inheritance

Answer:- 4) Hybrid inheritance

Q97. The inheritance is used to

  1. Avoid rewriting of the code
  2. Data abstraction
  3. Change the visibility modes
  4. Use virtual base class

Answer:- 1) Avoid rewriting of the code

Q98. Which of the following statement is true?

  1. a  base class can access the derived class members
  2. a derived class can access the private members of the class
  3. a base class can access the public and protected members of the derived class
  4. a derived class can access the public and protected members of the base class

Answer:- 1) a  base class can access the derived class members

Q99.  The unique name of the following is called

  1. function call
  2. function prototype
  3. function definition
  4. signature

Answer:- 4) signature

Q100. Which of the following can be overloaded?

  1. size of
  2. ? :
  3. .*
  4. [ ]

Answer:- 3) .*

Q101. Which of these best describes an array?

  1. A data structure that shows a hierarchical behavior
  2. Container of objects of similar types
  3. Arrays are immutable once initialised
  4. Array is not a data structure

Answer:- 2) Container of objects of similar types

Q102. Which of the following concepts make extensive use of arrays?

  1. Binary trees
  2. Scheduling of processes
  3. Caching
  4. Spatial locality

Answer:- 4) Spatial locality

Q103. Assuming int is of 4bytes, what is the size of int arr[15];?

  1. 11
  2. 15
  3. 19
  4. 60

Answer:- 4) 60

Q104. In general, the index of the first element in an array is ____

  1. 0
  2. -1
  3. 2
  4. 1

Answer:- 1

Q105. Elements in an array are accessed _____

  1. randomly
  2. sequentially
  3. exponentially
  4. logarithmically

Answer:- 1) randomly

Q106. The process of inserting an element in the stack is called ____

  1. Create
  2. Push
  3. Evaluation
  4. Pop

Answer:- 2) Push

Q107.The process of removing an element from the stack is called ____

  1. Create
  2. Push
  3. Evaluation
  4. Pop

Answer:- 4) Pop

Q108. Which of the following is not the application of stack?

  1. A parentheses balancing program
  2. Tracking of local variables at run time
  3. Compiler Syntax Analyzer
  4. Data Transfer between two asynchronous process

Answer:- 4) Data Transfer between two asynchronous process

Q109. The type of expression in which the operator succeeds its operands is?

  1. Infix Expression
  2. Prefix Expression
  3. Postfix Expression
  4. Both Prefix and Postfix Expressions

Answer:- 3) Postfix Expression

Q110. What data structure would you most likely see in non-recursive implementation of a recursive algorithm?

  1. Linked List
  2. Stack
  3. Queue
  4. Tree

Answer:- 2) Stack

Q111. An element Referring outside array bounds is a _?

  1. Logical error
  2. Syntax error
  3. Execution time error
  4. Both A and C

Answer:- 4) Both A and C

Q112. Every element in an array is searched against some searching key, special for

  1. Linear search
  2. Bubble sort
  3. Binary search
  4. All of them

Answer:- 1) Linear search

Q113. A one-dimensional array containing one-dimensional arrays is called

  1. Two-dimensional array
  2. Three-dimensional array
  3. Multi-dimensional array
  4. Multi-casting array

Answer:- 1) Two-dimensional array

Q114. A binary search algorithm is an algorithm that is used for

  1. Linear way to search values
  2. Bubble sorting technique
  3. Divide and conquer method
  4. None of them

Answer:- 3) Divide and conquer method

Q115. For finding value in an array which of the following technique is used?

  1. Binary search algorithm
  2. Bubble sort
  3. Linear search algorithm
  4. All of them

Answer:- 4) All of them

Q116. To evaluate an expression without any embedded function calls:

  1. One stack is enough
  2. Two stacks are needed
  3. As many stacks as the height of the expression tree are needed
  4. A turing machine is needed in the general case

Answer:- 1) One stack is enough

Q117. The data structure required to check whether an expression contains balanced parenthesis is?

  1. Stack
  2. Queue
  3. Array
  4. Tree

Answer:- 1) Stack

Q118. What data structure would you most likely see in a non-recursive implementation of a recursive algorithm?

  1. LinkList
  2. Stack
  3. Queue
  4. Tree

Answer:- 2) Stack

Q119. What is the result of the following operation (Push (S, X))

  1. S
  2. X
  3. Null
  4. None

Answer:- 2) X

Q120. Consider the linked list implementation of a stack. Which of the following node is considered as Top of the stack?

  1. First node
  2. Middle node
  3. Any node
  4. Last node

Answer:- 1) the First node

Q121. The type of expression in which the operator succeeds its operands is?

  1. Infix Expression
  2. pre fix Expression
  3. postfix Expression
  4. None

Answer:- 3) postfix Expression

Q122. What is the minimum number of stacks of size n required to implement a queue of size n?

  1. One
  2. Two
  3. Three
  4. Four

Answer:- 2) Two

Q123. A queue follows ___

  1. LIFO principle
  2. FIFO principle
  3. Ordered array
  4. Linear tree

Answer:- 2) FIFO principle

Q124. Circular Queue is also known as ____

  1. Rectangle Buffer
  2. Square Buffer
  3. Ring Buffer
  4. Curve Buffer

Answer:- 3) Ring Buffer

Q125. Queues serve major role in ______

  1. Simulation of recursion
  2. Simulation of arbitrary linked list
  3. Simulation of limited resource allocation
  4. Simulation of heap sort

Answer:- 3) Simulation of limited resource allocation

Q126. Which of the following is not the type of queue?

  1. Ordinary queue
  2. Single ended queue
  3. Circular queue
  4. Priority queue

Answer:- 2) Single-ended queue

Q127. In a Queue, if a user tries to remove an element from an empty queue, it is called ___.

  1. Underflow
  2. Empty collection
  3. Overflow
  4. Garbage Collection

Answer:- 1) Underflow

Q128. In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is

  1. log 2 n
  2. n/2
  3. log 2 n – 1
  4. n

Answer:- 4) n

Q129. What is the time complexity of inserting at the end in dynamic arrays?

  1. O(1)
  2. O(n)
  3. O(logn)
  4. Either O(1) or O(n)

Answer:- 4) Either O(1) or O(n)

Q130. What is the time complexity to count the number of elements in the linked list?

  1. O(1)
  2. O(n)
  3. O(logn)
  4. O(n2)

Answer:- 2) O(n)

Q131. What is the space complexity for deleting a linked list?

  1. O(1)
  2. O(n)
  3. O(logn)
  4. Either O(1) or O(n)

Answer:- 1) O(1)

Q132. Which of the array declaration is valid in C++?

  1. int a[3];
  2. int [3];
  3. a[3] of int
  4. int a[0-3];

Answer:- 1) int a[3];

Q133. The number of elements in a one-dimensional array can be calculated by

  1. Lower bound – Upper bound + 1
  2. Lower bound + Upper bound – 1
  3. Upper bound + Lower bound – 1
  4. Upper bound – Lower bound + 1

Answer:- 4) Upper bound – Lower bound + 1

Q134. Which of the following is used in “C++” to release the memory

  1. malloc( )
  2. new
  3. free ( )
  4. delete

Answer:- 4) delete

Q135. Which of the following provides two-way traversal?

  1. Single linked list
  2. Doubly linked list
  3. Circular linked list
  4. None of the above

Answer:- 2) Doubly linked list

Q136. To represent the empty linked list we can

  1. Start=Null
  2. Ptr=Null
  3. Start->next=Null
  4. Ptr->next=Null

Answer:- 1) Start=Null

Q137. Which of the following is used in “C++” to dynamically allocate the memory

  1. malloc( )
  2. new
  3. free ( )
  4. delete

Answer:- 2) new

Q138. Which of the following statement is correct?

  1. Run-time memory allocated is called dynamic memory allocated
  2. Compile-time memory allocated is called dynamic memory allocated
  3. Memory size is declared in advance in dynamic memory allocated
  4. All of the above

Answer:- 1) Run-time memory allocated is called dynamic memory allocated

Q139. Inspecting a node in a doubly-linked list requires

  1. One pointer exchanges
  2. Two pointer exchanges
  3. Three pointer exchanges
  4. Four pointers exchanges

Answer:- 2) Two pointer exchanges

Q140. What can be said about the array representation of a circular queue when it contains only one element?

  1. F=R=Null
  2. F=R+1
  3. F=R=1
  4. F=R=0

Answer:- 4) F=R=0

Q141. In input restricted deque

  1. Insertion is possible from one end and deletion from both the ends
  2. Deletion is possible from one end and insertion from both ends
  3. Insertion and deletion is possible only from one end
  4. Insertion and deletion is possible from different end

Answer:- 1) Insertion is possible from one end and deletion from both the ends

Q142. In deque,

  1. Insertion is possible from one end and deletion from both the ends
  2. Deletion is possible from one end and insertion from both ends
  3. Insertion and deletion is possible only from one end
  4. Insertion and deletion is possible from different end

Answer:- 4) Insertion and deletion is possible from different end

Q143. When the elements are deleted from the front end of the DEQUE then

  1. Front is increased by 1
  2. Rear is increased by 1
  3. Front is decreased by 1
  4. Rear is decreased by 1

Answer:- 1) Front is increased by 1

Q144. When the elements are deleted from the rear end of the deque then

  1. Front is increased by 1
  2. Rear is increased by 1
  3. Front is decreased by 1
  4. Rear is decreased by 1

Answer:- 4) Rear is decreased by 1

Q145. In the linked list, each node contains a minimum of two fields. One field is the data field to store the data second field is?

  1. Pointer to character
  2. Pointer to integer
  3. Pointer to node
  4. Node

Answer:- 3) Pointer to node

Q146. What would be the asymptotic time complexity to find an element in the linked list?

  1. O(1)
  2. O(n)
  3. O(n2)
  4. None of the above

Answer:- 2) O(n)

Q147. What kind of linked list is best to answer questions like “What is the item at position n”?

  1. Singly linked list
  2. Doubly linked list
  3. Circular linked list
  4. Array implementation of linked list

Answer:- 4) Array implementation of linked list

Q148. Linked list data structure offers considerable savings in

  1. Computational Time
  2. Space Utilization
  3. Both 1 & 2
  4. None of the mentioned

Answer:- 3) Both 1 & 2

Q149. If the elements “A”, “B”, “C”, and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?

  1. ABCD
  2. DCBA
  3. DCAB
  4. ACBD

Answer:- 1) ABCD

Q150. Who is the father of the C language?

  1. Dennis Ritchie
  2. Bjarne Stroustrup
  3. Brian Kernighan
  4. Ken Thompson

Answer:- 1) Dennis Ritchie

Download PDF of Basic Computer Engineering MCQs ( Algorithms MCQs, Data Structure MCQs, C Programming MCQs)

If you want to study offline or print out these MCQs then you can buy this pdf. Otherwise, you can read it on our website for free.

I hope you liked this post ‘Basic Computer Engineering MCQs ( Algorithms MCQs, Data Structure MCQs, C Programming MCQs)’. More resources and study material are available at Quickstudyhelper.com.

Stay Updated, Stay Safe, Stay Healthy

Thank You!

Leave a Comment