Cs Subjects Onlie QuizCs 301 Midterm Important Repeated Mcqs Quiz Zain Akhtar6 months ago6 months ago01 mins Cs 301 Midterm Important Repeated Mcqs Online Quiz 1 / 25 Traversing a binary tree can only be done using Recursion Iteration Both none 2 / 25 The expression if ( ! heap->isEmpty() ) checks Heap is empty Heap is full Heap is not empty Not a valid expression (not confirm) 3 / 25 In a min heap the parent node has key smaller than or equal to Left child Right child Both None 4 / 25 Consider a binary tree, represented by the following array: A,B,C,D,E,F,G,I Is it astrictly binary tree ? Yes No 5 / 25 When a complete binary tree represented by an array then if right child is atposition 5 then left child will be at position _____ 2 3 4 6 6 / 25 An expression tree will always be a, Complete binary tree Binary search tree Heap AVL tree 7 / 25 If there are N external nodes is a binary tree then what will be the no. of the internalnodes in this binary tree? N-1 N N+1 N+2 8 / 25 See the below code and fill the appropriate answer for? void fastInorder(TreeNode* p) {while((p=nexInorder(p)) != ? ) cout p->getInfo(); } Dummy rootNode LTH RTH 9 / 25 Whenever we call a function, the compiler makes a stack, the top element of the stackis _____ of the function. First argument Return address Last argument None of the above 10 / 25 The principal benefit of a linked list over a conventional array is that the order of the linkeditems may be_____ from the order that the data items are stored in memory. Same Identical Different Equivalent 11 / 25 A queue is a ________data structure, whereas a stack is a ________data structure. FIFO, LIFO LIFO,FIFO both of these none of these 12 / 25 To create a _________ we link the last node with the first node in the list. Double linked list Circularly-linked list Linked list None of the above 13 / 25 Local variables of a function are stored in, Binary Search Tree Stack Queue AVL Tree 14 / 25 A template is a function or class that is written with a __________data type. Specific Definite Generic None of the above 15 / 25 it will be efficient to place stack elements at the start of the list because insertion and removaltake _______time. Variable Constant Inconsistent None of the above 16 / 25 Which of the following operations returns top value of the stack? push pop top first 17 / 25 In the linked list implementation of the stack class, where does the push member function placesthe new entry on the linked list? After all other entries that are greater than the new entry At the head After all other entries that are smaller than the new entry. At the tail 18 / 25 Stack and Queue can be implemented using _______, Singly Link List Binary Tree Binary Search Tree AVL Tree 19 / 25 Local variables of a function are stored in, Binary Search Tree Stack Queue AVL Tree 20 / 25 Which boolean expression indicates whether the numbers in two nodes (p and q) arethe same. Assume that neither p nor q is null. p == q p.data == q.data p.nextNode == q. nextNode p.data == q 21 / 25 Which of the following is known as "Last-In, First-Out" or LIFO Data Structure? Linked List Stack Queue Tree 22 / 25 To create a _________ we link the last node with the first node in the list. Circularly-linked list Linked list Double linked list None of the above 23 / 25 Which of the following operations returns top value of the stack? push pop top first 24 / 25 A kind of expressions where the operator is present between two operands called________expressions Infix Postfix Prefix None of the above 25 / 25 When an executable program run, it is loaded in the memory and becomes a_______. Thread .h file Process None of the above Your score isThe average score is 0% 0% Restart quiz Post navigation Previous: Cs 101 Midterm Important Repeated Mcqs QuizNext: Cs 304 Midterm Important Repeated Mcqs Quiz