MCQ on Computer Science Engineering
1- What are the types of Arrays?
(A) int, float, char, double
(B) struct, enum
(D) all of the above
2- An array Index starts with_________
3- Choose a correct statement about C language arrays.
(A) An array size cannot change once it is created.
(B) Array element value can be changed any number of times
(C) To access Nth element of an array student, use students[n–1] as the starting index is 0.
(D) All of the above
4- What is an array Base Address in C language?
(A) Base address is the address of 0th index element.
(B) An array b base address is &b
(C) An array b base address can be printed with printf (“%d”, b);
(D) All of the above
5- An entire array is always passed by ___ to a called function.
(A) Call by value
(B) Call by reference
(C) Address relocation
(D) Address restructure
6- What is a String in C Language?
(A) String is a new Data Type in C
(B) String is an array of Characters with null character as the last element of the array.
(C) String is an array of Characters with null characters as the first element of array
(D) String is an array of Integers with 0 as the last element of array.
7- Choose a correct statement about C String.
(A) Character array, ary is a string.
(B) Ary has no Null character at the end
(C) String size is not mentioned
(D) String cannot contain special characters.
8- What is the Format specifier used to print a String or Character array in C Printf or Scanf function?
9- Which of the following statement(s) about stack data structure is/are NOT correct?
(A) Linked List are used for implementing Stacks
(B) Top of the Stack always contain the new node
(C) Stack is the FIFO data structure
(D) Null link is present in the last node at the bottom of the stack
10- Which of the following is not an inherent application of stack?
(A) Reversing a string
(B) Evaluation of postfix expression
(C) Implementation of recursion
(D) Job scheduling
11- The type of expression in which operator succeeds its operands is_________
(A) Infix Expression
(B) Prefix Expression
(C) Postfix Expression
(D) Both Prefix and Postfix Expressions
12- In linked list each node contains a minimum of two fields. One field is data field to store the data second field is __________
(A) Pointer to character
(B) Pointer to integer
(C) Pointer to node
13- The concatenation of two lists can be performed in O(1) time. Which of the following variation of the linked list can be used?
(A) Singly linked list
(B) Doubly linked list
(C) Circular doubly linked list
(D) Array implementation of list
14- The data structure required for Breadth First Traversal on a graph is__________
15- 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?
16- Which of the following is not the type of queue?
(A) Ordinary queue
(B) Single ended queue
(C) Circular queue
(D) Priority queue
17- The average depth of a binary tree is given as__________
(C) O(N2 )
(D) O(log N)
18- If binary trees are represented in arrays, what formula can be used to locate a left child, if the node has an index i?
(A) 2i + 1
(B) 2i + 2
19- In a max-heap, element with the greatest key is always in which node?
(A) Leaf node
(B) First node of left sub tree
(C) Root node
(D) First node of right sub tree
20- Heap can be used as ________________
(A) Priority queue
(C) A decreasing order array
(D) Normal Array
1-(D), 2-(B), 3-(D), 4-(D), 5-(B), 6-(B), 7-(A), 8-(C), 9-(C), 10-(D), 11-(C), 12-(C), 13-(C), 14-(C), 15-(A), 16-(B), 17-(D), 18-(A), 19-(C), 20-(A)