CST 3RD Sem 2ND Internal Model
CST 3RD Sem 2ND Internal Model
1. JA vertex with degree 1 is called as - a) isolated vertex, b) pendant vertex, c) singular vertex, d) zero vertex
1
2. Merge sort is a a) divide and conquer approach, b) greedy approach, c) branch and bound algorithm, d) string algorithm
1
3. The best case time complexity of quick sort is - a) O(nlogn), b) O(n), c) O(n^2), d)O(logn)
4. Which ofthe following is not a sorting technique? - a) heap sort, b) tree sort, c) merge sort, d) isolated sort
5. Which of the following method is used for sorting in merge sort?-a) merging, b) partitioning, c) selection, d) exchanging
6. Which of thefollowing time complexity gives maximum growth rate? -a) O(3^n), b) O(2^n), c) O(n), d) O(nlogn) 1
7. Which of the following is a kind of binary tree? - a) tree, b) branch, c) root, d) BST
8. Which of the following sorting uses concept of complete binary tree? - a) shell sort, b) radix sort, c) heap sort, d) quick sort
9. Which of the following searching is used when array is sorted? - a) binary search, b) linear search, c) exhaustive search, d) 1
|sequentialsearch
10. Which of the following terms is not related to Graph? - a) walk, b) path, c) degree, d) NP hard 1
11. Write down the algorithm for binary search technique. 5
12. Explain walk, trail and path with help of diagrams.
13. Show the steps of bubble sort for the input array {12,32,11,21,3 }.
14. Showthe steps of shellsort for the input array {12,32,11,21,3,7,67,56}. 5
15. a) Compare between linear search and binary search. 2
b) Compare between bubble sort and selection sort. 2
c) What is binary search tree?
COMPUTER SYSTEM ORGANIZATION
1
1. Which directive specifies the end of execution of aprogram. - a) End, b) Return , c) Stop, d) Terminate.
c) Computer 1
2. The CISCstands for - a) Computer Instruction Set Compliment , b)Complete Instruction Set Compliment ,
Indexed Set Components , d) Complex Instruction set computer Deadlock , d) Structural 1
3. The situation wherein the data of operands are not available is called - a) Data hazard, b) Stock, c)
|hazard.
c)Memory Address d)Arithmetic| 1
4. The address in the main memory is known as - a)Logical Address b)Physical Address
Address 1
ERROR.
5. Whenever the data is found in the cache memory it is called as - a) HIT, b) MISS , c) FOUND, d)
c) Set Associative , d)) 1
6. In which mapping, the data can be mapped anywhere in the Cache Memory.- a) Associative , b) Direct,
Indirect
these
7. |An example of direct addressing mode is a) MØV C, B,b) LDA 2021H, c) both a&b,d) none of
access , d) none of these
8. DMA stands for - a) Direct memory adder, b) Direct memory address , c) Direct memory 1
9. The small extremely fast, RAMs are called as - a) heaps, b) accumulators ,c) stacks, d) cache. 1
none of these
10. An example of direct addressing mode is - a) MOV C, B ,b) LDA 2021H,c) both a & b,d) 3
11. l(a) Write down the differences between Procedure and macro.
2
b) what is assembler directives? 5
12. (a) Write short note on i) TLB, ii) Cache memory 3
13. (a) Write the differences between RISC and CISC architecture.
2
b) Define pipeline.
14. (a) Discuss different types of addressing modes with example. 3
15. |(a) Distinguish between near call and far call. 2
(b) Explain virtual memory.
DATA STRUCTURE
1. Which of the following is NOT a type oftreetraversal?- a) Pre-order, b) In-order, c) Post-order, d) Side-order.
2. Which of the following is a property of a binary search tree (BST)?- a) Allnodes have at most one child. b) The left subtree of
a node contains only nodes with values greater than the node. c) The right subtree of a node contains only nodes with values
|less than the node.d) The depth of the left and right subtrees differs by at most one level.
3. What is the purpose of a breadth-first search (BFS) algorithm?- a) Searching in a sorted array, b) Finding the shortest path in a 1
graph, c) Traversinga binary tree, d) Sorting elements in an array
4. What is the main advantage of using a linked list over an array?- a) Constant time access to elements, b) Efficient memory| 1
usage, c) Easy implementation of dynamic resizing, d) Supports random access
5. In the context of trees, what is a leaf node?- a) A node with no children, b) The root node, c) A node with two children, d) A| 1
|node with one child.
6. Which of the following is a non-linear data structure?- a) Stack, b) Queue, c) Linked List, d) Tree. 1
7. Which of the following is an advantage of using a circular linked list?- a. Easier insertion and deletion operations, b)Supports 1
|bidirectionaltraversal, c) Efficient use of memory, d)Simplifies searching for specific elements
8. In the context of trees, what is a parent node?- a) A node with n0 children, b) The root node, c) A node with at least twol 1
children., d) Anode with at least one child.
9. What is the purpose of the "NULL"pointer in linked lists?- a) It points to the first node, b) It indicates the end of the list, c) It 1
points to the previous node, d) It is not used in linked lists.
10. What is the primary goal of tree traversal algorithms?- a) Sorting the tree elements, b) Searching for a specific node, c) 1
Visiting every node in a specific order, d) Balancing the tree.
11. \(a) Write down the pseudo codeto insert an element at a given position of a doubly linked list 3
(b) Write down the pseudo code to delete an element from the front of asingly linked list 2
12. (a) Create a binary tree from given inorder and preorder traversal. Inorder:H,D,B,I,E,A,F,J,C,K,G 4
Preorder:A,B,D,H,E,I,C,F,J, G,K
(b) Define depth and hight ofa tree.
13.(a) construct an AVL tree for the following data: 21,25,29,8,5,15,35,18,16.10,2,3,7,45,31 5
14. (a) Write down the pseudo code for inorder, preorder and postorder traversal. 5
15.(a) Define Binary Search tree.
(6)Write down the difference between DFS and BFS. 2
(c) Construct a B-tree of order 4for the following data: 45,60,30,15,18,40,45,55,20,10,8,7,68,78,90 2
COMPUTER PROGRAMMING IN C
1
characters of string ch to string s?
1. Which among the given options compares atmost n
ch, n), d) int stremp(s, ch)
a) int strncmp(ch, s, n), b) int strcmp(ch, s), c) int strncmp(s, c) strncon), d) memcon()
1
Which function willyou choose to join two words? - a) strcpy(), b) strcat(),
2
terminating null character. - a) strlength(), b)) 1
3. The function returns the number of characters that are present before the
strlen(),c) strlent), d) strchr()
elements as zero? -
4. What are the different ways to initialize an array with all
c=0; int array[5] = fa, b, c}: d) All of the mentioned
a) int array[5] = {}, b) int array[5] = {0};, c) int a =0, b=0,function? - 1
declaration of
5. Which of the following is a correct format for return-type (argument|
|a) return-type function-name(argument type);, b) return-type function-name(argument type){}, c)
type)function-names, d) all of the mentioned
which keyword? -
6. The value obtained in the function is given back to main by using
a) return, b) static, c) new, d) volatile
7. What willbe the output of the following C code?
#include <stdio.h>
void main)
m);
m);
void m)
static int x = 5;
X++;
printf("%d", x);
a) 6 7, b) 6 6, c) 5 5, d) 5 6
1
Which is an indirection operator among the following? - a) &, b) *, c) ->, d). 1
9 What will be the output of the following C code?
#include <stdio.h>
void main)
int x = 0:
int *ptr = &x;
printf("%dn", *ptr);