You are here: Home > Competitive Exams
All posts from

NIELIT Question Paper : A Level Course Data Structures Through C++

Name of the Institute : National Institute of Electronics and Information Technology (nielit.gov.in)
Name of the Course : A Level Course
Subject Code/Name : A6R4/Data Structures Through C++
Document Type : Old Question Paper
Location : India
Website : nielit.gov.in

Download Model/Sample Question Paper :
January 2012 : https://www.pdfquestion.in/uploads/nielit.in/7079-jan12A6-R4.pdf
JULY 2012 : https://www.pdfquestion.in/uploads/nielit.in/7079-jul12A6-R4.pdf
January 2013 : https://www.pdfquestion.in/uploads/nielit.in/7079-jan13A6-R4.pdf
JULY 2013 : https://www.pdfquestion.in/uploads/nielit.in/7079-jul13A6-R4.pdf
January 2014 : https://www.pdfquestion.in/uploads/nielit.in/7079-jan14A6-R4.pdf
July 2014 : https://www.pdfquestion.in/uploads/nielit.in/7079-jul14A6-R4.pdf

NIELIT Data Structures Through C++ Sample Paper

A6-R4:
(Answer all the questions)

PART ONE

1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “tear-off” answer sheet attached to the question paper, following instructions therein. (1×10)

Related : NIELIT Question Paper A Level Course Structured System Analysis & Design : www.pdfquestion.in/7078.html

1.1 Array M[5,6] is stored in memory in row-major order and base address of M =200. If there are 4 words per memory cell then address of M[2,3] is
A) 250
B) 252
C) 254
D) 256

1.2 Sparse matrices are the matrices with
A) Less proportion of zeros
B) High proportion of zeros
C) No zeros
D) None of the above

1.3 Height of the binary search tree of the given sequence 40, 30 42, 5, 7, 23, 9, 19 is (empty tree is of height 0):
A) 4
B) 5
C) 6
D) None of the above

1.4 Which of the following data structure is used in recursion?
A) Array
B) Stack
C) Linked list
D) None of the above

1.5 The value of the postfix expression 5 2 2 + * 30 6 / – is
A) 36
B) 16
C) 15
D) None of the above

1.6 The hashing technique belongs to the following file organization method:
A) Direct File Organization
B) Sequential File Organization
C) Index sequential File Organization
D) None of the above

1.7 If i is an integer and p and q are pointers, which of the following assignments is valid?
A) p = *&i;
B) i=&*q;
C) p=&*i;
D) i= *p;

1.8 Protected member of a class in C++
A) Can be inherited by derived class but cannot be accessed directly through an object
B) Cannot be inherited by derived class but can be accessed directly through an object
C) Can be inherited by derived class and can be accessed directly through an object
D) Cannot be inherited by derived class and cannot be accessed directly through an object

1.9 f(n) is O(g(n)) if
A) There exists positive integers c and N such that f(n) cg(n) for all n N
B) There exists positive integers c and N such that f(n) cg(n) for all n N
C) There exists positive integers c and N such that f(n) cg(n) for all n N
D) None of the above

1.10 Which of the following is a method to resolve collision?
A) Chaining
B) Folding
C) Truncation
D) Division Method

2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and ENTER in the “tear-off” sheet attached to the question paper, following instructions therein. (1×10)
2.1 A binary tree can be empty tree.
2.2 It is necessary to define a constructor in every class.
2.3 Stack is a LIFO (Last In First Out) list.
2.4 Queue is useful in implementing heap sort.
2.5 Hashing is used to arrange the records in a particular order.

2.6 The worst case complexity of quick sort is O(logn)
2.7 A binary tree is a tree in which every node can have at least two children.
2.8 Every graph is a connected graph.
2.9 Constructor can be a static member of the class.
2.10 Doubly linked list has no advantage in deletion as compared to singly linked list.

4.1 A linked list with a special node is ________ linked list.
4.2 Constructors are defined in ________ section of a class.
4.3 A tree with any number of children is a ________ tree.
4.4 The left most node in right sub tree of a node is its ________.
4.5 A tree can be drawn if it’s in preorder and ________ traversal is given.

4.6 Number of binary search trees for three nodes is________.
4.7 ________ cannot be declared as virtual.
4.8 ________ members of a class cannot be inherited.
4.9 Binary search can be applied if data is ________.
4.10 If hash table acts like a linked list then the efficiency of search is ________ where size of hash table is n.

PART TWO

(Answer any FOUR questions)
5. a) Create a class ‘shape’ and derive the classes, box, cube, cylinder from it. The class ‘shape’ has functions volume() and whole-surface-area(). Override these two functions in each of these derived classes. The dimensions of the shapes (box, cube, cylinder) are to be taken from user. Write a main function to test the classes.

b) Show that the function f (n) defined by
f (1) = 1
f (n) = f(n-1) + 1/n for n > 1
has the complexity O(log n).
(10+5)

6. a) Consider an array of size 25 × 4. Base address of this array is 200 and the word size is 4 units. The array is stored in row major form. Find the address of location A (12,3). Also find the address of the same element assuming that the array is stored in column major order.
b) Design a class for doubly linked list and write the following functions:
i) Write a function to insert a node at the beginning.
ii) Write a function to insert a node at the end. (7+8)

7. a) Design a method for simulating a Queue using stacks. Write pseudo routines for push, pop to manipulate the stacks.
b) Write a function to print a given input string in reverse order using recursion.
c) Translate the following arithmetic expression into its equivalent infix expression showing each step of conversion.
P: 12 7 3 – / 2 1 5 + * + (6+6+3)

1 Comment
Add a Comment
  1. Let S={1,2,3,4,5} and R define the relation of <= over S or R partial order. Find the R.

Leave a Reply

How to add comment : 1) Type your comment below. 2) Type your name. 3) Post comment.

www.pdfquestion.in © 2021

Contact Us   Privacy Policy   SiteMap