Download presentation
Presentation is loading. Please wait.
1
Quiz
2
Q1-What does the following program print?
#include<stdio.h> void f(int *p, int *q) { p = q; *p = 2; } int i = 0, j = 1; int main() f(&i, &j); printf("%d %d \n", i, j); getchar(); return 0;
3
Q2-In the given below statement, what does the “pf” indicate. int (
Q2-In the given below statement, what does the “pf” indicate? int (*pf)(); A-pf is a pointer of a function which return int B - pf is a pointer C - pf is a function pointer D - None of the above
4
Q3-The value of j at the end of the execution of the following C program.
int incr (int i) { static int count = 0; count = count + i; return (count); } main () { int i,j; for (i = 0; i <=4; i++) j = incr(i); }
5
Q4- Which of the following is not a type of constructor?
Copy constructor B. Friend constructor C. Default constructor D. Parameterized constructor
6
Q5-Complexity of Linear Search Algorithm
Q5-Complexity of Linear Search Algorithm? Q6-Operation of processing each element in list is knows as ? Q7- Give an Example of Linear and Non-Linear Data structure.
7
Q8-Linked list are not suitable data structure of which one of the following problems ?
[A] Insertion sort [B] Binary search [C] Radix sort [D] Polynomial manipulation
8
Q9-What is the time complexity of Build Heap operation
Q9-What is the time complexity of Build Heap operation. Build Heap is used to build a max(or min) binary heap from a given array. Build Heap is used in Heap Sort as a first step for sorting. A.O(nLogn) B.O(n^2) C.O(Logn) D.O(n)
9
Q10-Merge sort uses ? [A] Divide and conquer strategy
[B] Backtracking approach [C] Heuristic search [D] Greedy approach
10
Q11-A line connecting the points (1,1) and (5,3) is to be drawn, using DDA algorithm.Find the value of x and y increments [A] x-increments = 1; y-increments =1 [B] x-increments = 0.5; y-increments =1 [C] x-increments = 1; y-increments =0.5 [D] None of above
11
Q12.The relation { (1,2), (1,3), (3,1), (1,1), (3,3), (3,2), (1,4), (4,2), (3,4)} is
A.Reflexive B. Transitive C.Symmetric D.Asymmetric
12
Q13-The number of leaf nodes in a complete binary tree of depth d is
A.2^d B. 2^(d–1)+1 C. 2^(d+1)+1 D.2^(d+1)
13
Q14-A partial ordered relation is transitive, reflexive and A
Q14-A partial ordered relation is transitive, reflexive and A.Antisymmetric B.Bisymmetric C. Anti reflexive. D. Asymmetric
14
Q15-The maximum degree of any vertex in a simple graph with n vertices is A.n–1
B.n+1 C.2n–1 D. n
15
Q16 - Reduce the boolean expression
ABC + A'B'C + A'BC + ABC' + A'B'C' to five literals. [A] A'B' + B(A+C) [B] AB + A'(C+C') [C] A'B' + A(B+C) [D] A'B + B'(A+C')
16
Q17 -For the given boolean function, F(w,x,y,z) = wx + yz, what would be the value of (F+F')?
[C]. w(x+y') + w'y'z + wx'z' [D]. x(wy+z) + y'(xz+w) + z'(y+x')
17
Q18 -Express the boolean function F = xy + x'z in POS
[A]. POS(0,2,4,5) [B]. POS(0,2,4,6) [C]. POS(0,2,5,6) [D]. POS(0,4,5,6)
18
Q19 -Determine the value of base x if 211 (base x) = 152 (base 8)
[A]. x=7 [B]. x=5 [C]. x=6 [D]. None of these
19
Q20 -Database table by name Loan_Records is given below.
Borrower Bank_Manager Loan_Amount Ramesh Sunderrajan Suresh Ramgopal Mahesh Sunderrajan What is the output of the following SQL query ? SELECT count(*) From (SELECT Borrower.Bank_Manager From Loan_Records) AS S Natural Join (SELECT BANK_manager, Loan_Amount From Loan_Records) As T ); [A]. 5 [B]. 6 [C]. 9 [D]. 3
20
Answers Ans Ans2 - A Ans Ans4 - B Ans5 -O(n) Ans6 -Traversal Ans7 -Array,Linked List/Graph/Tree. Ans8-(B). Binary search
21
Answers Ans9 - o(n). Ans10 – (A). Divide and conquer strategy
Ans11 -. x-increments = 1; y-increments =0.5 Ans12- (B) Transitive. Ans13- (A) 2d Ans14- (A) Antisymmetric. Ans15 - (A) n-1 Ans16 – (A) A'B' + B(A+C)
22
Answers Ans17 – (B) 1 Ans18 – (A) POS(0,2,4,5) Ans19 -. (A) x=7
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.