0% found this document useful (0 votes)
24 views32 pages

Programming Imp Questions

The document is a comprehensive guide for BCA 1st Year students on Programming Methodology and Data Structures, focusing on C++. It covers key concepts such as programming basics, C++ syntax, classes and objects, inheritance, data structures, algorithms, and practical programming exercises. The content is bilingual, adhering to the New Education Policy and includes previous year solved papers.

Uploaded by

hanuman120405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views32 pages

Programming Imp Questions

The document is a comprehensive guide for BCA 1st Year students on Programming Methodology and Data Structures, focusing on C++. It covers key concepts such as programming basics, C++ syntax, classes and objects, inheritance, data structures, algorithms, and practical programming exercises. The content is bilingual, adhering to the New Education Policy and includes previous year solved papers.

Uploaded by

hanuman120405
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

NP

P
P
Code No.: MP-BCA-102

B RILLIANT 'S ®

Programming
Methodology &
Data Structures
NP
BCA 1st Year

 Vinay Sharma  Dr. Alok Mishra

Bilingual (English & Hindi)


A§J«oOr Ed§ {hÝXr XmoZm| ^mfmAm| _| EH$ gmW

According to New Education Policy


with Previous Year Solved Papers

www.thebrilliants.in
C++ C++ C++

P
C++ C++ C++
C++ C++
C++ C++ C++ C++
C++
New Syllabus
Programming Methodology &
Data Structures
UNIT 1.
NP Introduction to Programming: Programming Concept, Characteris-
tics of Programming, Stages in Program Development, Algorithms,
Notations, Design, Flowcharts, Types of Programming Methodolo-
gies.
Basics of C++: A Brief History of C++, Application of C++. Compil-
ing & Linking, Tokens, Keywords, Identifiers & Constants. Basic
Data Types, User-Defined Data Types, Symbolic Constant, Type
Compatibility, Reference Variables, Operator in C++, Scope Resolu-
tion Operator, Member Dereferencing Operators, Memory Man-
agement Operators, Manipulators. Type Cast Operator.
Functions In C++: The Main Function, Function Prototyping, Call
by Reference Call by Address, Call by Value, Return by Reference,
Inline Function, Default Arguments, Constant Arguments, Func-
tion Overloading, Function with Array.

UNIT 2.
Classes & Objects: A Sample C++ Program with class, Defining
Member functions, Making an Outside Function Inline, Nesting of
Member Functions, Private Member Functions, Arrays within a Class,
Memory Allocation for Objects, Static Data Members, Static Mem-
ber, Functions, Array of Objects, Object as Function Arguments,
Friend Functions, Virtual functions, Returning Objects, Constant
member functions, Pointer to Members, Local Classes.
P
Constructor & Destructor: Constructor, Parameterized Constructor,
Multiple Constructors in a Class, Constructors with Default Argu-
ments, Dynamic Initialization of Objects, Copy Constructor, Dy-
namic Constructor and Destructor.

UNIT 3.
Inheritance: Defining Derived Classes, Single inheritance, Making
a Private Member Inheritable, Multilevel Inheritance, Hierarchical
Inheritance, Multiple Inheritance, Hybrid Inheritance, Virtual Base
Classes, Abstract Classes. Constructor in Derived Classes, Nesting
of Classes. Operator Overloading & Type Conversion, Polymor-
phism, Pointers: Pointers with Arrays C++, Streams: C++ Stream
Classes, Unformatted I/O Operation, Formatted I/O Operation,
Managing Output with Manipulators, Exception Handling.
NP
UNIT 4.
Data Structure: Basic concepts, Linear and Non-Linear data struc-
tures
Algorithm Specification: Introduction, Recursive algorithms, Data
Abstraction, Performance analysis.
Arrays: Representation of single, two-dimensional arrays, triangu-
lar arrays, sparse matrices-array and linked representations.
Stacks: Operations, Array and Linked Implementations, Applica-
tions infix to Post fix Conversion, Infix to Postfix Conversion, Postfix
Expression Evaluation, Recursion Implementation.
Queues: Definition, Operations, Array and Linked Implementa-
tions. Circular Queue-Insertion and Deletion Operations, Dequeue
(Double Ended Queue), Priority Queue- Implementation.

UNIT 5.
Linked Lists: Singly Linked Lists, Operations, Concatenating, circu-
larly linked lists-Operations for Circularly linked lists, Doubly Cir-
cular Linked List- Operations, Doubly Circular Linked List, Header
Linked List. Trees: Representation of Trees, Binary tree, Properties
of Binary Trees, Binary Tree Representations- Array and Linked
Representations, Binary Trees Traversals, Threaded Binary Trees.
Heap: Definition, Insertion, Deletion.
P
UNIT 6.
Graphs: Graph ADT, Graph Representations, Graph Traversals,
Searching.
Hashing: Introduction, Hash tables, Hash Functions, Overflow
Handling.
Sorting: Bubble sort, Selection Sort, Insertion Sort, QuickSort, Merge
Sort, Comparison of Sorting Methods,
Search Trees: Binary Search Trees, AVL Trees- Definition and Ex-
amples.

UNIT 7.
Innovations in India, origin of Julia Programming Language, In-
dian Engineers who designed new programming languages, open
source languages, Dr. Sartaj Sahni computer scientist - pioneer of
NP
data structure, Other relevant Contributors and their Contributions.

PRACTICAL
1. Write a program to swap the contents of two variables.
2. Write a program for finding the roots of a Quadratic Equation.
3. Write a program to find area of a circle, rectangle square using
switch case.
4. Write a program to print table of any number.
5. Write a program to print Fibonacci series.
6. Write a program to find factorial of a given number using recur-
sion.
7. Write a program to convert decimal (integer) number into equiva-
lent binary number.
8. Write a program to check given string is palindrome or not.
9. Write a program to print digits of entered number in reverse
order.
10. Write a program to print sum of two matrices.
11. Write a program to print multiplication of two matrices.
12. Write a program to generate even/odd series from 1 to 100.
13. Write a program whether a given number is prime or not.
14. Write a program for call by value and call by reference.
P
15. Write a program to create a pyramid structure.
1
12
123
1234
16. Write a program to check entered number is Armstrong or not.
17. Write a program to input N numbers and find their average.
18. Write a program to find the area and volume of a rectangular
box using constructor.
19. Write a program to design a class time with hours, minutes and
seconds as data members. Use a data function to perform the
addition of two time objects in hours, minutes and seconds.
20. Write a program to implement single inheritance.
21. Write a program to find largest element from an array.
22. Write a program to implement push and pop operations on a
NP stack using array.
23. Write a program to perform insert and delete operations on a
queue using array.
24. Write a program for Linear search.
25. Write a program for Binary search.
26. Write a program for Bubble sort.
27. Write a program for Selection sort.
28. Write a program for Quick sort.
29. Write a program for insertion sort.
30. Write a program to implement linked list.


BRILLIANT'S / Programming Methodology & Data Structures / 6


C++ C++ C++ C++ C++
C++ C++

P
C++ C++ C++
C++
C++ C++

Contents
UNIT

Long Answer Type Questions


Q.1 What is a program? What are the characteristics of a
good program?
àmoJ«m‘ жm h¡? EH$ AÀN>o àmoJ«m‘ H$s {deofVmE§ жm h¢?
NP Short Answer Type Questions
1. What is meant by Program? Explain.
àmoJ«m‘ H$m AW© жm h¡? g‘PmBE& 35
STAGES OF PROGRAM DEVELOPMENT
àmoJ«m‘ S>odbn‘|Q> Ho$ MaU
Long Answer Type Questions
Q.2. Discuss Program development life cycle.
àmoJ«m‘ S>odbn‘|Q> OrdZ MH«$ na MMm© H$s{OE&
Short Answer Type Questions
1. What are the various stages of Program Development?
Explain.
àmoJ«m‘ S>odbn‘|Q> Ho$ {d{^ÝZ MaU ³¶m hmoVo h¡? g‘PmBE& [2023] 38
ALGORITHM, NOTATION AND DESIGN
EëJmo[aX‘, ZmoQ>oeZ Am¡a {S>µOmBZ
Long Answer Type Questions
Q.3. What is an algorithm? What are design and notations
of algorithm? Give example. / EëJmo[aX‘ жm h¡? EëJmo[aX‘
Ho$ {S>OmBZ Am¡a ZmoQ>oeZ жm h¢? CXmhaU Xr{OE&

BRILLIANT'S / Programming Methodology & Data Structures / 7


P
Short Answer Type Questions
1. Write an algorithm to find maximum of three given
numbers. / Xr J¶r VrZ g§»¶mAm| H$m A{YH$V‘ kmV H$aZo Ho$
{bE EëJmo[aX‘ {b{IE& 40

FLOWCHART / âbmoMmQ>©

Long Answer Type Questions


Q.4. Explain flowchart with symbols. Give examples.
âbmoMmQ>© H$mo àVrH$m| Ho$ gmW g‘PmBE& CXmhaU Xr{OE&
Short Answer Type Questions
1. Differentiate Flow Chart and Algorithm with an example.
CXmhmaU Ho$ Ûmam âbmoMmQ>© Am¡a EëJmo{aÏ‘ ‘| AÝVa H$s{OE& [2022] 43
NP
PROGRAMMING METHODOLOGIES / àmoJ«mq‘J nÕ{V`m±

Long Answer Type Questions


Q.5. What is meant by programming methodology? Explain
its types. / àmoJm« q‘J nÕ{V H$m AW© жm h¡? BgHo$ àH$ma g‘PmBE&

Short Answer Type Questions


1. Explain top-down and bottom-up programming in de-
tail.
Q>m°n-S>mCZ Am¡a ~m°Q>‘-An àmoJ«mq‘J H$mo {dñVma go g‘PmBE& 47

BASICS OF C++: HISTORY OF C++


C++ H$s ‘yb ~mV|: C++ H$m B{Vhmg
Long Answer Type Questions
Q.6. What is C++? Give the brief history of C++ language
with its applications. / C++ жm h¡? C++ ^mfm H$m g§{jßV
B{Vhmg BgH$s EpßbHo$eÝg Ho$ gmW Xr{OE&
Short Answer Type Questions
1. What is C++? What are its applications?
C++ жm h¡? BgH$s EpßbHo$eÝg жm h¢? 53

BRILLIANT'S / Programming Methodology & Data Structures / 8


P
COMPILING AND LINKING / H§$nmBqbJ Am¡a qbqH$J
Short Answer Type Questions
Q.7. Explain C++ basics with compiling and linking of a
C++ program. / C++ àmoJ«m‘ H$s H§$nmBqbJ Am¡a qbqH$J Ho$ gmW
C++ ‘yb ~mV| g‘PmBE& 56
TOKENS, KEYWORDS, IDENTIFIERS, CONSTANTS AND
SYMBOLIC CONSTANTS / Q>moH$Ýg, H$sdS²>g©, AmB©S>|{Q>’$m¶g©,
H$m°ÝgQ>¢Q²>g Am¡a àVrH$mË‘H$ H$m°ÝgQ>¢Q²>g
Long Answer Type Questions
Q.8. Explain following: / {ZåZ{b{IV H$mo g‘PmBE:
(i) C++ tokens / C++ Q>moH$Ýg
NP (ii) C++ keywords / C++ H$sdS²>g©
(iii) identifiers and variables / AmB©S>|{Q>’$m¶g© Am¡a d¡[aE~ëg
(iv) constants / H$m°ÝgQ>¢Q²>g
Short Answer Type Questions
1. Explain C++ tokens and keywords.
C++ Q>moH$Ýg Am¡a H$sdS²>g© H$mo g‘PmBE& 58
DATA TYPES - USER DEFINED DATA TYPES
S>oQ>m àH$ma - Cn¶moJH$Vm© n[a^m{fV S>oQ>m àH$ma
Long Answer Type Questions
Q.9. What are the fundamental data types in C++?
C++ ‘| ‘m¡{bH$ S>oQ>m àH$ma жm h¢?
Short Answer Type Questions
1. Explain user defined data types.
¶yOa {S>’$mB§S> S>oQ>m Q>mBßg H$mo g‘PmBE& 63

TYPE COMPATIBILITY / àH$ma AZwHy$bVm

Short Answer Type Questions


Q.10. What is type compatibility? Explain its types.
àH$ma AZwHy$bVm жm h¡? BgHo$ àH$mam| H$mo g‘PmBE& 65

BRILLIANT'S / Programming Methodology & Data Structures / 9


P
REFERENCE VARIABLES / ao’$a|g d¡[aE~ëg
Long Answer Type Questions
Q.11. Explain types of reference variable with examples.
ao’$a|g d¡[aE~b Ho$ àH$ma CXmhaU g{hV g‘PmBE& 67

OPERATORS IN C++ / C++ ‘| Am°naoQ>g©


Long Answer Type Questions
Q.12. Explain various types of operators in C++ with ex-
amples.
C++ ‘| {d{^ÝZ àH$ma Ho$ Am°naoQ>g© H$mo CXmhaU g{hV g‘PmBE&
Short Answer Type Questions
1. Explain arithmetic and logical operators.
NP
A§H$J{UVr¶ Am¡a Vm{H©$H$ Am°naoQ>g© H$mo g‘PmBE& 68

SCOPE RESOLUTION OPERATOR / ñH$mon [aµOm°ë¶yeZ Am°naoQ>a


Long Answer Type Questions
Q.13. Explain scope resolution operator in C++. What is mem-
ber dereferencing operator? / C++ ‘| ñH$mon [aµOm°ë¶yeZ
Am°naoQ>a H$mo g‘PmBE& ‘|~a S>rao’$a|qgJ Am°naoQ>a жm h¡? 74

MEMORY MANAGEMENT / ‘o‘moar ‘¡ZoO‘|Q>

Long Answer Type Questions


Q.14. What is memory management? Explain memory man-
agement operators in C++. / ‘o‘moar ‘¡ZoO‘|Q> жm h¡? C++
‘| ‘o‘moar ‘¡ZoO‘|Q> Am°naoQ>g© H$mo g‘PmBE& 77

MANIPULATORS / ‘¡{Zß¶wboQ>g©

Long Answer Type Questions


Q.15. What are manipulators in C++? Explain with ex-
amples. / C++ ‘| ‘¡{Zß¶wboQ>g© жm h¢? CXmhaU g{hV g‘PmBE& 78

BRILLIANT'S / Programming Methodology & Data Structures / 10


P
TYPE CAST OPERATOR / Q>mBn H$mñQ> Am°naoQ>a
Short Answer Type Questions
Q.16. What is Type Casting? Explain with example.
Q>mBn H$mpñQ>¨J ³¶m h¡? CXmhaU Ûmam g‘PmBE& [2022] 80

FUNCTIONS IN C++: THE MAIN FUNCTION, FUNCTION


PROTOTYPING
C++ ‘| ’§$³eÝg: MAIN ’§$³eZ, µ’§$ŠeZ àmoQ>moQ>mBqnJ
Long Answer Type Questions
Q.17. Write short note on: / {ZåZ na g§{jßV {Q>ßnUr {b{IE:
(i) defining function / {S>’$mBqZJ ’§$ŠeZ
NP (ii) main function / ‘oZ ’§$ŠeZ
(iii) function prototyping / ’§$ŠeZ àmoQ>moQ>mBqnJ

Short Answer Type Questions


1. What is Function? What are its various types? Explain
with the help of example. / ’§$³eZ ³¶m hmoVo h¡? ¶h {H$VZo
àH$ma Ho$ hmoVo h¡? CXmhaU H$s ghm¶Vm go g‘PmBE& [2023] 81

CALL BY VALUE, CALL BY REFERENCE, CALL BY ADDRESS


H$m°b ~m¶ d¡ë¶y, H$m°b ~m¶ ao’$a|g, H$m°b ~m¶ ES´>og
Long Answer Type Questions
Q.18. Explain call by value, call by address and call by ref-
erence with example in C++. / C++ ‘| CXmhaU Ho$ gmW
H$m°b ~m¶ d¡ë¶y, H$m°b ~m¶ ES´o>g Am¡a H$m°b ~m¶ ao’$a|g g‘PmBE&
Short Answer Type Questions
1. Differentiate Call by Value and Call by Reference. [2022]
Call by Value Am¡a Call by Reference ‘| AÝVa H$s{OE& 84
Q.19. What is return by reference? Explain with an example.
[aQ>Z© ~m¶ ao’$a|g жm h¡? CXmhaU g{hV g‘PmBE& 88

BRILLIANT'S / Programming Methodology & Data Structures / 11


P
INLINE FUNCTIONS / BZbmBZ ’§$³eÝg
Short Answer Type Questions
Q.20. What are inline functions? Explain.
BZbmBZ ’§$Še§g жm h¢? g‘PmBE& 89
DEFAULT ARGUMENTS, CONSTANT ARGUMENTS
{S>µ’$m°ëQ> Am°½¶w©‘|Q²>g, H$m°ÝgQ>¢Q> Am°½¶w©‘|Q²>g
Long Answer Type Questions
Q.21. Explain default argument and constant argument with
example. / {S>µ’$m°ëQ> Am°½¶w©‘|Q> Am¡a H$m°ÝgQ>¢Q> Am°½¶w©‘|Q> H$mo CXmhaU
Ho$ gmW g‘PmBE& 90

FUNCTION OVERLOADING / ’§$ŠeZ AmodabmoqS>J


NP Short Answer Type Questions
Q.22. Explain function overloading in C++.
C++ ‘| ’§$ŠeZ AmodabmoqS>J H$mo g‘PmBE& [2023] 92

FUNCTIONS WITH ARRAY / Aao Ho$ gmW ’§$³eÝg


Short Answer Type Questions
Q.23. How can we use functions with array?
h‘ Aao Ho$ gmW ’§$³eÝg H$m Cn¶moJ H¡$go H$a gH$Vo h¢? 94
 Review Questions 96

 Objective Questions 97
UNIT

CLASSES AND OBJECTS / Šbmg Am¡a Am°ãOoŠQ>


Long Answer Type Questions
Q.24. What are class and objects? Write a program in C++
using class and object. / Šbmg Am¡a Am°ãOoŠQ> жm h¢? Šbmg
Am¡a Am°ãOoŠQ> H$m Cn¶moJ H$aHo$ C++ ‘| EH$ àmoJ«m‘ {b{IE&
BRILLIANT'S / Programming Methodology & Data Structures / 12
P
Short Answer Type Questions
1. What are classes and objects? Explain with example.
Šbmgog Am¡a Am°ãOoŠQ²>g жm h¢? CXmhaU g{hV g‘PmBE& 100

DEFINING MEMBER FUNCTIONS, MAKING OUTSIDE


FUNCTION INLINE
‘|~a ’§$³eZ H$mo n[a^m{fV H$aZm, ~mhar ’§$³e§g H$mo BZbmBZ ~ZmZm
Q.25. What is a member function? How is member function
defined? / ‘|~a ’§$ŠeZ жm h¡? ‘|~a µ’§$ŠeZ H¡$go n[a^m{fV
{H$¶m OmVm h¡? 104

NESTING OF MEMBER FUNCTIONS / ‘|~a ’§$³e§g H$s ZopñQ>¨J


Long Answer Type Questions
NP
Q.26. What is meant by nesting of member function?
‘|~a ’§$ŠeZ Ho$ ZopñQ>§J H$m AW© Š`m h¡? 107

PRIVATE MEMBER FUNCTION / àmBdoQ> ‘|~a ’§$ŠeZ


Long Answer Type Questions
Q.27. What is private member function? Explain.
àmBdoQ> ‘|~a ’§$ŠeZ жm h¡? g‘PmB¶o& 109

ARRAYS WITHIN A CLASS / EH$ ³bmg Ho$ ^rVa AaoÁm


Q.28. How can we define array as a member in a class?
Explain using example. / h‘ Aao H$mo EH$ ³bmg ‘| EH$ ‘|~a
Ho$ ê$n ‘| H¡$go n[a^m{fV H$a gH$Vo h¢? CXmhaU XoH$a g‘PmBE& 111

MEMORY ALLOCATION FOR OBJECTS


Am°ãOo³Q²>g Ho$ {bE ‘o‘moar Amd§Q>Z
Short Answer Type Questions
Q.29. How is memory allocated for objects? Explain.
Am°ãOo³Q²>g Ho$ {bE ‘o‘moar H¡$go Amd§{Q>V H$s OmVr h¡? g‘PmB¶o& 112

BRILLIANT'S / Programming Methodology & Data Structures / 13


P
STATIC MEMBERS OF A CLASS, STATIC FUNCTION
MEMBERS / EH$ ³bmg Ho$ ñQ>¡{Q>H$ ‘|~g©, ñQ>¡{Q>H$ ’§$³e§g ‘|~g©
Long Answer Type Questions
Q.30. Explain with example:
{ZåZ{b{IV H$mo CXmhaU g{hV g‘PmBE:
(i) Static members of class / ³bmg Ho$ ñQ>¡{Q>H$ ‘|~a
(ii) Static function members / ñQ>¡{Q>H$ ’§$³eZ ‘|~g©
Short Answer Type Questions
1. What is meant by static members of a class?
{H$gr ³bmg Ho$ ñQ¡{Q>H$ ‘|~g© H$m AW© жm h¡? 113

ARRAY OF OBJECTS / Am°ãOo³Q²>g H$m Aao


Short Answer Type Questions
NP
Q.31. What is array of objects? Give example.
Am°ãOo³Q²>g H$m Aao жm h¡? CXmhaU Xr{OE& 117
PASSING OBJECTS AS FUNCTION ARGUMENTS
µ’§$ŠeZ Am½¶w©‘|Q> Ho$ ê$n ‘| Am°ãOoŠQ> nmg H$aZm
Long Answer Type Questions
Q.32. Explain method to pass objects to function.
’§$³eZ H$mo Am°ãOoQ²>g nmg H$aZo H$s {d{Y g‘PmBE& 120

FRIEND FUNCTIONS / ’«|$S> ’§$³e§g


Short Answer Type Questions
Q.33. What is Friend Function? Explain Friend Function and
Friend Class with examples.
Friend ’§$³eZ ³¶m hmoVm h¡? Friend ’§$³eZ VWm Friend ³bmg
H$mo CXmhaU g{hV g‘PmBE& [2023] 125

VIRTUAL FUNCTIONS / dMw©Ab ’§$³e§g


Short Answer Type Questions
Q.34. Define Virtual Function with an example.
CXmhaU Ûmam dMw©Ab ’§$³eZ H$mo n[a^m{fV H$s{OE&[2023, 2022] 127

BRILLIANT'S / Programming Methodology & Data Structures / 14


P
RETURNING OBJECT FROM FUNCTION
µ’§$ŠeZ go Am°ãOo³Q> [aQ>Z© H$aZm

Short Answer Type Questions


Q.35. How is an object returned using function? Explain.
’§$ŠeZ H$m Cn¶moJ H$aHo$ Am°ãOoŠQ> H¡$go [aQ>Z© {H$¶m OmVm h¡? g‘PmBE& 128

CONSTANT MEMBER FUNCTIONS / H$m°ÝgQ>¢Q²> ‘|~a ’§$³e§g

Short Answer Type Questions


Q.36. What is a constant member function?
EH$ H$m°ÝgQ>¢Q²> ‘|~a ’§$³eZ ³¶m h¡? 129
NP POINTERS TO MEMBERS / ‘|~g© H$s Amoa nm°B§Q>g©

Short Answer Type Questions


Q.37. How can we refer to members of objects using point-
ers? Explain. / h‘ nm°B§Q>g© H$m Cn¶moJ H$aHo$ Am°ãOoQ²>g Ho$ ‘|~g©
H$mo H¡$go g§X{^©V H$a gH$Vo h¢? g‘PmBE& 131

LOCAL CLASSES / bmoH$b ³bmgog

Short Answer Type Questions


Q.38. What is meant by local class?
bmoH$b ³bmg go жm A{^àm¶ h¡? 132

CONSTRUCTOR / H§$ñQ´>³Q>a

Short Answer Type Questions


Q.39. What is Constructor? What are its characteristics?
Explain its various types with example.
Constructor ³¶m hmoVo h¡? BgH$s ³¶m {deofVmE§ hmoVr h¡? BgHo$
{d{^ÝZ àH$ma H$mo CXmhaU g{hV g‘PmBE& [2023] 133

BRILLIANT'S / Programming Methodology & Data Structures / 15


P
MULTIPLE CONSTRUCTORS IN CLASS
³bmg ‘| ‘ëQ>rnb H§$ñQ´>³Q>g©
Short Answer Type Questions
Q.40. How can we define multiple constructors in class?
EH$ Šbmg ‘| h‘ ‘ëQ>rnb H§$ñQ´>ŠQ>g© H¡$go n[a^m{fV H$a gH$Vo h¢?
OR
Explain multiple constructors of a class.
EH$ Šbmg Ho$ ‘ëQ>rnb H§$ñQ´>ŠQ>g© H$mo g‘PmBE& 136

CONSTRUCTORS WITH DEFAULT ARGUMENTS


S>r\$m°ëQ> Am½¶w©‘|Q²>g Ho$ gmW H§$ñQ´>³Q>g©
Short Answer Type Questions
NP
Q.41. What are constructors with default arguments?
{S>’$m°ëQ> Am½¶w©‘|Q> dmbo H§$ñQ´>ŠQ>a жm hmoVo h¢?
OR
How can default arguments be used with construc-
tors. / H$ÝñQ´>ŠQ>g© Ho$ gmW {S>µ’$m°ëQ> Am½¶w©‘|Q²>g H$m Cn¶moJ H¡$go
{H$¶m Om gH$Vm h¡? 137

COPY CONSTRUCTOR / H$m°nr H§$ñQ´>ŠQ>a


Short Answer Type Questions
Q.42. What is copy constructor? How is it used?
H$m°nr H§$ñQ´>ŠQ>a жm h¡? BgH$m Cn¶moJ H¡$go {H$¶m OmVm h¡?
OR
Explain copy constructor with example.
H$m°nr H§$ñQ´>ŠQ>a H$mo CXmhaU g{hV g‘PmBE& 138

DYNAMIC INITIALIZATION OF OBJECTS


Am°ãOo³Q²>g H$m S>m¶Zo{‘H$ B{Z{e¶bmBµOoeZ
Short Answer Type Questions
Q.43. What is meant by dynamic initialization of objects?
Am°ãOo³Q²>g Ho$ S>m¶Zo{‘H$ B{Z{e¶bmBOoeZ H$m AW© ³¶m h¡? 140

BRILLIANT'S / Programming Methodology & Data Structures / 16


P
DYNAMIC CONSTRUCTOR / S>m¶Zo{‘H$ H§$ñQ´>³Q>a
Short Answer Type Questions
Q.44. What is a dynamic constructor? How does it allocate
the memory?
S>m¶Zo{‘H$ H§$ñQ´>ŠQ>a жm h¡? ¶h ‘o‘moar H¡$go Amd§{Q>V H$aVm h¡?
OR
Explain dynamic constructor with example.
S>m¶Zo{‘H$ H§$ñQ´>ŠQ>a H$mo CXmhaU g{hV g‘PmBE& 142

DESTRUCTOR / {S>ñQ´>ŠQ>a

Short Answer Type Questions


Q.45. What is a destructor? How is it useful?
{S>ñQ´>ŠQ>a жm h¡? ¶h H¡$go Cn¶moJr h¡?
NP
OR
Explain destructor with example.
{S>ñQ´>ŠQ>a H$mo CXmhaU g{hV g‘PmBE& 144
 Review Questions 146

 Objective Questions 148


UNIT

INHERITANCE: DEFINING DERIVED CLASSES


BZho[aQ>|g: {S>amBìS> ³bmgog n[a^m{fV H$aZm
Short Answer Type Questions
Q.46. What is Inheritance? Explain various types of inherit-
ance with example. / Inheritance ³¶m hmoVm h¡? {d{^ÝZ
àH$ma Ho$ Inheritance H$mo CXmhaU g{hV g‘PmBE& [2023] 151
Long Answer Type Questions
Q.47. Explain types of inheritance in C++ with examples.
C++ _| {d{^ÝZ àH$ma Ho$ B§ho[aQ>|g H$mo CXmhaU g{hV g_PmBE& 153

BRILLIANT'S / Programming Methodology & Data Structures / 17


P
SINGLE INHERITANCE: MAKING PRIVATE MEMBER
INHERITABLE
qgJb BZho[aQ>|g: àmBdoQ> ‘|~a H$mo BZho[aQ> H$aZo ¶mo½¶ ~ZmZm
Short Answer Type Questions
Q.48. What are the various access specifiers in C++? Explain.
C++ ‘| {d{^ÝZ access specifiers ³¶m h¡? g‘PmBE& [2022] 153

MULTILEVEL INHERITANCE / ‘ëQ>rbodb BZho[aQ>|g

Short Answer Type Questions


Q.49. Explain multilevel inheritance in C++ with example.
C++ ‘| ‘ëQ>rbodb BZho[aQ>|g H$mo CXmhaU g{hV g‘PmBE& 156

HIERARCHICAL INHERITANCE / hm¶am{H©$H$b BZho[aQ>|g


NP
Short Answer Type Questions
Q.50. Explain hierarchical inheritance in C++ with example.
CXmhaU Ho$ gmW C++ ‘| hm¶am{H©$H$b BZho[aQ>|g H$mo g‘PmBE& 158

MULTIPLE INHERITANCE / ‘ëQ>rnb BZho[aQ>|g

Short Answer Type Questions


Q.51. Explain multiple inheritance in C++ with example.
C++ ‘| ‘ëQ>rnb BZho[aQ>|g H$mo CXmhaU g{hV g‘PmBE& 161

HYBRID INHERITANCE / hmB{~«S> BZho[aQ>|g


Short Answer Type Questions
Q.52. Explain hybrid inheritance in C++ with example.
C++ ‘| hmB{~«S> BZho[aQ>|g H$mo CXmhaU g{hV g‘PmBE& 163

VIRTUAL BASE CLASS / dMw©Ab ~og Šbmg


Short Answer Type Questions
Q.53. What is virtual base class? How is it useful in solving
diamond problem? / dMw©Ab ~og Šbmg жm h¡? S>m¶‘§S> àm°ãb‘
H$mo hb H$aZo ‘| ¶h {H$g àH$ma Cn¶moJr h¡? 165

BRILLIANT'S / Programming Methodology & Data Structures / 18


P
ABSTRACT CLASSES / EãgQ´>o³Q> ³bmgog
Short Answer Type Questions
Q.54. Explain concept of abstract class in C++ with example.
C++ ‘| EãgQ´>o³Q> ³bmg H$s AdYmaUm H$mo CXmhaU g{hV g‘PmBE& 167

CONSTRUCTORS IN DERIVED CLASS / {S>amBìS> ³bmg ‘| H§$ñQ´>³Q>g©

Short Answer Type Questions


Q.55. Explain the use of constructors in derived class.
{S>amBìS> Šbmg ‘| H§$ñQ´>ŠQ>g© Ho$ Cn¶moJ H$mo g‘PmBE& 170

NESTING OF CLASSES / ³bmgog H$s ZopñQ>¨J


Short Answer Type Questions
NP
Q.56. What is nesting of classes? Explain using example.
³bmgog H$s ZopñQ>§J жm h¡? CXmhaU H$m Cn`moJ H$aHo$ g‘PmBE& 170

OPERATOR OVERLOADING / Am°naoQ>a AmodabmoqS>J


Short Answer Type Questions
Q.57. What is Operator Overloading? Write a program in
C++ to overload binary '+' operator.
Operator AmodabmoqS>J ³¶m hmoVr h¡? ~mBZar '+" Am°naoQ>a H$mo
overload H$aZo Ho$ {bE C++ ‘| EH$ àmoJ«m‘ {b{IE& [2023] 172

TYPE CONVERSIONS / Q>mBn H$ÝdµO©Ýg

Short Answer Type Questions


Q.58. What is meant by type conversion in class? Give ex-
amples. / ³bmg ‘| Q>mBn H$ÝdµOZ
© H$m жm AW© h¡? CXmhaU Xr{OE& 174

POLYMORPHISM / nm°br‘m°{’©$Á
µ ‘
Short Answer Type Questions
Q.59. What is polymorphism? Explain its types.
nm°br‘m°{’©$µÁ‘ жm h¡? BgHo$ àH$mam| H$mo g‘PmBE& 177

BRILLIANT'S / Programming Methodology & Data Structures / 19


P
POINTERS / nm°B§Q>g©

Short Answer Type Questions


Q.60. What is a pointer? Explain declaration and initializa-
tion of pointers. / EH$ nm°B§Q>a жm h¡? nm°B§Q>g© Ho$ {S>ŠboaoeZ
Am¡a B{Z{e¶bmBµOoeZ H$mo g‘PmBE& 179

POINTER TO ARRAY / Aao Ho$ {bE nm°B§Q>a


Short Answer Type Questions
Q.61. Explain pointer to array with example.
nm°B§Q>a Qy> Aao H$mo CXmhaU g{hV g‘PmBE& 181

ARRAY OF POINTERS / nm°B§Q>g© H$m Aao


NP Short Answer Type Questions
Q.62. What is array of pointers? Explain with example.
nm°B§Q>g© H$s Aao жm h¡? CXmhaU g{hV g‘PmBE& 182

STREAMS, C++ STREAM CLASSES / ñQ´>råg, C++ ñQ´>r‘ Šbmgog


Short Answer Type Questions
Q.63. What is a stream in C++? Write the stream classes in
C++. / C++ ‘| ñQ´>r‘ жm h¡? C++ ‘| ñQ´>r‘ Šbmgog {b{IE& 184
UNFORMATTED I/O OPERATION, FORMATTED I/O
OPERATION / AZ’$m°‘}Q>oS> I/O Am°naoeZ, ’$m°‘}Q>oS> I/O Am°naoeZ
Long Answer Type Questions
Q.64. Explain formatted and unformatted I/O operations in
C++. [2023]
C++ ‘| ’$m°‘}Q>oS> Am¡a AZ’$m°‘}Q>oS> I/O Am°naoeÝg H$mo g‘PmBE&

Short Answer Type Questions


1. Differentiate between Formatted and Unformatted I/O
Operating with example. / CXmhmaU Ûmam Formatted Am¡a
Unformatted I/O Am°naoeZ ‘| AÝVa H$s{OE& [2022] 187

BRILLIANT'S / Programming Methodology & Data Structures / 20


P
EXCEPTIONS HANDLING / E³goße§g h¢S>qbJ
Long Answer Type Questions
Q.65. Explain exception handling in C++ with example.
C++ ‘| EŠgoßeZ h¢S>qbJ H$mo CXmhaU g{hV g‘PmBE&
Short Answer Type Questions
1. What is meant by exception handling? How is it use-
ful in handling errors? / E³goßeZ h¢S>qbJ H$m жm AW© h¡?
Eag© h¢S>qbJ ‘| ¶h {H$g àH$ma Cn¶moJr h¡? 193
 Review Questions 197

 Objective Questions 198


UNIT

NP
DATA STRUCTURE- BASIC CONCEPTS
S>oQ>m ñQ´>ŠMa- ~w{Z¶mXr AdYmaUmE±
Short Answer Type Questions
Q.66. What are data structures? Explain linear and non-lin-
ear data structures. / S>oQ>m ñQ´>ŠMg© жm h¢? br{Z¶a Am¡a
Zm°Z-br{Z¶a S>oQ>m ñQ´>ŠMg© H$mo g‘PmBE& 200
ALGORITHM SPECIFICATION: INTRODUCTION, RECUR-
SIVE ALGORITHMS, DATA ABSTRACTION, PERFORMANCE
ANALYSIS / EëJmo[aX‘ ñno{g{’$Ho$eZ - n[aM¶, [aH${g©d
EëJmo[aX‘, S>oQ>m EãgQ´>o³eZ, na’$m°‘}Ýg EZm{b{gg
Long Answer Type Questions
Q.67. Write a short note on: / {ZåZ na EH$ g§{jßV {Q>ßnUr {b{IE:
(i) Recursive algorithm / [aH${g©d EëJmo[aX‘
(ii) Data Abstraction / S>oQ>m EãgQ´>o³eZ
(iii) time and space complexity / g‘¶ Am¡a ñWmZ O{Q>bVm

BRILLIANT'S / Programming Methodology & Data Structures / 21


P
Short Answer Type Questions
1. What is Recursive Algorithm? Write a program to ex-
plain Recursive Algorithm. / [aH${g©d EëJmo[aÏ‘ ³¶m h¡?
[aH${g©d EëJmo[aÏ‘ H$mo g‘PmZo hoVw EH$ àmoJ«m‘ {b{IE& [2022] 202

ARRAY: REPRESENTATION OF SINGLE, TWO-DIMENSI-


ONAL ARRAY / Aao: qgJb, Qy>-S>m¶‘|eZb Aao H$m à{V{Z{YËd
Long Answer Type Questions
Q.68. What is an array? Explain single dimensional array
and two-dimensional array with example.
EH$ Aao жm h¡? qgJb S>m¶‘|eZb Aao Am¡a Qy>-S>m¶‘|eZb Aao H$mo
CXmhaU g{hV g‘PmBE&
Short Answer Type Questions
NP
1. What is single dimensional array? Give example.
qgJb S>m¶‘|eZb Aao жm h¡? CXmhaU Xr{OE& 208
Q.69. Write a program in C++ to find maximum and mini-
mum in an array of integers. / B§{Q>Og© H$s EH$ Aao ‘| A{YH$V‘
Am¡a ݶyZV‘ ImoOZo Ho$ {bE C++ ‘| EH$ àmoJ«m‘ {b{IE& 212
Q.70. Write a program in C++ for addition of two matrices
using two-dimensional array. / Qy>-S>m¶‘|eZb Aao H$m Cn¶moJ
H$aHo$ Xmo ‘¡Q´>mBgog H$mo Omo‹S>Zo Ho$ {bE C++ ‘| EH$ àmoJ«m‘ {b{IE& 214

TRIANGULAR ARRAY / {ÌH$moUr¶ Aao


Short Answer Type Questions
Q.71. What is triangular array? / {ÌH$moUr¶ Aao жm h¡? 217

SPARSE MATRIX / ñnmg© ‘¡{Q´>Šg

Long Answer Type Questions


Q.72. What is sparse matrix? Explain the array and linked
representation of sparse matrix. / ñnmg© ‘¡{Q´>Šg жm h¡?
ñnmg© ‘¡{Q´>Šg Ho$ Aao Am¡a qbŠS> [aàoµO|Q>oeZ H$mo g‘PmBE&

BRILLIANT'S / Programming Methodology & Data Structures / 22


P
Short Answer Type Questions
1. What are the benefits of Sparse matrix?
ñnmg© ‘¡{Q´>Šg Ho$ жm ’$m¶Xo h¢? 217
STACK: OPERATIONS, ARRAY AND LINKED
IMPLEMENTATIONS / ñQ>¡H$: Am°naoeÝg, Aao Am¡a qb³S> H$m¶m©Ýd¶Z
Long Answer Type Questions
Q.73. What is stack data structure? Explain array implemen-
tation of stack.
ñQ>¡H$ S>oQ>m g§aMZm жm h¡? ñQ>¡H$ Ho$ Aao Båßbr‘|Q>oeZ H$mo g‘PmBE&
OR
Implement stack using linked list.
qb³S> {bñQ> H$m Cn¶moJ H$aHo$ ñQ>¡H$ H$m¶m©pÝdV H$s{OE&
Short Answer Type Questions
NP
1. Explain stack and its operations.
ñQ>¡H$ Am¡a CgHo$ Am°naoeÝg H$s ì¶m»¶m H$s{OE& 221
INFIX TO POSTFIX CONVERSION
Bpݵ’$Šg go nmoñQ>{µ’$Šg H$ÝdµO©Z
Long Answer Type Questions
Q.74. What are infix and postfix expressions? Write a pro-
gram in C++ to convert infix to postfix.
BpÝ’$Šg Am¡a nmoñQ>{’$Šg EŠgàoeÝg жm h¢? BpÝ’$Šg H$mo
nmoñQ>{’$Šg ‘| ~XbZo Ho$ {bE C++ ‘| EH$ àmoJ«m‘ {b{IE&
Short Answer Type Questions
1. Write an algorithm to convert an infix expression into
postfix expression using stack. Also convert the fol-
lowing infix expression into post fix expression: / In-
fix expression H$mo postfix E³gàoeZ ‘| ~XbZo Ho$ {bE stack
H$s ghm¶Vm go EH$ EëJmo[aÏ‘ {b{IE& {ZåZ{b{IV infix ex-
pression H$mo postfix ‘| ^r H$ÝdQ>© H$s{OE:
(A/(B-C) * D + E) [2023]
2. Explain infix to postfix conversion with example.
BpÝ’$Šg Qy> nmoñQ>{’$Šg H$ÝdµO©Z H$mo CXmhaU g{hV g‘PmBE& 229

BRILLIANT'S / Programming Methodology & Data Structures / 23


P
EVALUATION OF POSTFIX EXPRESSIONS USING STACK
ñQ>¡H$ H$m Cn¶moJ H$aHo$ nmoñQ>{µ’$Šg EŠgàoeÝg H$m ‘yë¶m§H$Z
Long Answer Type Questions
Q.75. How to use stack for evaluation of postfix expression?
Write a C++ program to evaluate postfix expression.
nmoñQ>{’µ $Šg EŠgàoeZ Ho$ ‘yë¶m§H$Z Ho$ {bE ñQ>H¡ $ H$m Cn¶moJ H¡$go H$a|?
nmoñQ>{’$Šg EŠgàoeZ H$m ‘yë¶m§H$Z H$aZo Ho$ {bE C++ àmoJm« ‘ {b{IE&
Short Answer Type Questions
1. Write an algorithm for evaluating postfix expression
using stack. / ñQ>¡H$ H$m Cn¶moJ H$aHo$ nmoñQ>{µ’$Šg EŠgàoeZ Ho$
‘yë¶m§H$Z Ho$ {bE EH$ EëJmo[aX‘ {b{IE& 235

RECURSION IMPLEMENTATION / [aH$µO©Z H$m¶m©Ýd¶Z


NP
Short Answer Type Questions
Q.76. How recursion is implemented using stack? Explain.
ñQ>¡H$ H$m Cn¶moJ H$aHo$ [aH$µO©Z H¡$go H$m¶m©pÝdV {H$¶m OmVm h¡?
g‘PmBE& 239
QUEUE: DEFINITION, OPERATIONS, ARRAY AND LINKED
IMPLEMENTATION
³¶y: n[a^mfm, Am°naoeÝg, Aao Am¡a qbŠS> H$m¶m©Ýd¶Z
Long Answer Type Questions
Q.77. What is Queue? How are queues represented in
memory? Also write the algorithm for inserting, de-
leting and traversing queue elements. / Queue ³¶m hmoVm
h¡? ‘o‘moar ‘| queues H$mo H¡$go represent H$aVo h¡? Queue ‘|
Ebr‘|Q²>g H$mo BÝgQ>© H$aZo, {S>{bQ> H$aZo VWm Q´>odg© H$aZo H$s EëJmo[aÏ‘
^r {b{IE& [2023]

Short Answer Type Questions


1. Write a program to create a Queue.
EH$ Queue {Z{‘©V H$aZo hoVw EH$ àmoJ«m‘ {b{IE& [2022] 241

BRILLIANT'S / Programming Methodology & Data Structures / 24


P
CIRCULAR QUEUE: INSERTION AND DELETION
gH©w$ba ³¶y: B§ge©Z Am¡a {S>breZ
Long Answer Type Questions
Q.78. What is circular queue? Write a program to insert
and delete data from a circular queue.
gH©w$ba ³¶y жm h¡? gH©w$ba ³¶y go S>oQ>m B§gQ>© Am¡a S>rbrQ> H$aZo Ho$
{bE EH$ àmoJ«m‘ {b{IE&
Short Answer Type Questions
1. What is circular queue? What are the operations that
can be performed on circular queue? / gH©w$ba ³¶y жm
h¡? do H$m¡Z go Am°naoe§g h¢ Omo gHw©$ba жy na {H$E Om gH$Vo h¢? 250

DOUBLE ENDED QUEUE- DEQUEUE / S>~b E§S>oS> жy- S>rжy


NP
Long Answer Type Questions
Q.79. What is Dequeue? Implement Double Ended Queue
in C++. / S>r³¶y жm h¡? c++ ‘| S>~b E§S>oS> ³¶y bmJy H$r{OE&

Short Answer Type Questions


1. What are the operations possible in a double ended
queue? / S>~b E§S>oS> ³¶y ‘| H$m¡Z go Am°naoe§g g§^d h¢? 257
PRIORITY QUEUE- IMPLEMENTATION
àm¶mo[aQ>r жy - H$m¶m©Ýd¶Z
Long Answer Type Questions
Q.80. What is priority queue? Write a program to implement
priority queue in C++. / àm¶mo[aQ>r жy жm h¡? c++ ‘| àm¶mo[aQ>r
жy bmJy H$aZo Ho$ {bE EH$ àmoJ«m‘ {bpIE&
Short Answer Type Questions
1. What is a priority queue? What are its types?
àm¶mo[aQ>r жy жm h¡? BgHo$ àH$ma жm h¢? 262
 Review Questions 268

 Objective Questions 270

BRILLIANT'S / Programming Methodology & Data Structures / 25


P
UNIT

LINKED LIST: SINGLY LINKED LIST OPERATIONS


qb³S> {bñQ>: qgJbr qb³S> {bñQ> Am°naoeÝg
Long Answer Type Questions
Q.81. Write an algorithm to create a Singly Link List.
qgJb qbH$ {bñQ> {Z{‘©V H$aZo hoVw EH$ EëJmo[aÏ‘ {b{IE& [2022]
Short Answer Type Questions
1. What is linked list? How can you insert nodes to it?
qbŠS> {bñQ> жm h¡? Amn Bg‘| ZmoS²>g H¡$go S>mb gH$Vo h¢? 272
NP
Q.82. Write a program to concatenate two linked list.
Xmo qb³S> {bñQ> H$mo Omo‹S>Zo Ho$ {bE EH$ àmoJ«m‘ {b{IE& 283

CIRCULARLY LINKED LISTS- OPERATIONS FOR CIRCU-


LARLY LINKED LIST
g³¶w©bbr© qbŠS> {bñQ²>g- g³¶w©bbr© qbŠS> {bñQ> Ho$ {bE Am°naoeÝg
Long Answer Type Questions
Q.83. Explain circular linked list with its operations.
g³¶w©ba qbŠS> {bñQ> H$mo BgHo$ Am°naoeÝg Ho$ gmW g‘PmBE&
Short Answer Type Questions
1. Explain insertion of a new node in circular linked list.
g³¶w©ba qbŠS> {bñQ> ‘| EH$ Z¶m ZmoS> S>mbZm g‘PmBE& 286

DOUBLY LINKED LIST - OPERATIONS, DOUBLY CIRCULAR


LINKED LIST
S>~br qbŠS> {bñQ> - Am°naoe§g, S>~br g³¶w©ba qbŠS> {bñQ>
Long Answer Type Questions
Q.84. What is doubly linked list? Explain its operations.
S>~br qbŠS> gyMr жm h¡? BgHo$ Am°naoeÝg H$mo g‘PmBE&

BRILLIANT'S / Programming Methodology & Data Structures / 26


P
Short Answer Type Questions
1. Explain Doubly Linked List with the help of an ex-
ample. Also write an algorithm to insert a node at
beginning, middle and end of the Doubly Linked List.
Doubly qbH$ {bñQ> H$mo CXmhaU H$s ghm¶Vm go g‘PmBE& Dou-
bly qb³S> {bñQ> Ho$ Amaå^, ‘ܶ VWm AÝV ‘| ZmoS> BÝgQ>© H$aZo Ho$
{bE EëJmo[aÏ‘ ^r {b{IE& [2023] 297

HEADER LINKED LIST / hoS>a qbŠS> {bñQ>


Short Answer Type Questions
Q.85. What is header linked list? Explain its types.
hoS>a qbŠS> {bñQ> жm h¡? BgHo$ àH$ma g‘PmBE&
OR
What are the types of header linked list?
NP
hoS>a qbŠS> {bñQ> Ho$ àH$ma жm h¢? 306
TREES: REPRESENTATION OF TREES
Q´>rµO: Q´>rµO H$m à{V{Z{YËd
Short Answer Type Questions
Q.86. Explain tree data structure. / Q´>r S>oQ>m ñQ´>ŠMa H$mo g‘PmBE&
OR
How are trees represented? Explain.
Q´>rµO H$m à{V{Z{YËd H¡$go {H$¶m OmVm h¡? g‘PmBE& 310
BINARY TREE, PROPERTIES OF BINARY TREE, BINARY
TREE REPRESENTATION
~mBZar Q´>r, ~mBZar Q´>r Ho$ JwU, ~mBZar Q´>r à{V{Z{YËd
Long Answer Type Questions
Q.87. What is Binary Tree? What are its properties?
~mBZar Q´>r ³¶m hmoVm h¡? BgH$s ³¶m {deofVmE§ hmoVr h¡? [2023]

Short Answer Type Questions


1. What is a binary tree? Explain its properties.
~mBZar Q´>r жm h¡? BgHo$ JwUm| H$mo g‘PmBE& 313

BRILLIANT'S / Programming Methodology & Data Structures / 27


P
ARRAY AND LINKED REPRESENTATION OF BINARY TREE
~mBZar Q´>r H$m Aao Am¡a qbŠS> {Zê$nU
Short Answer Type Questions
Q.88. Write a program in C++ to implement binary tree us-
ing array. / Aao H$m Cn¶moJ H$aHo$ ~mBZar Q´>r H$mo bmJy H$aZo Ho$
{bE C++ ‘| EH$ àmoJ«m‘ {b{IE& 317

BINARY TREE TRAVERSAL / ~mBZar Q´>r Q´>¡dg©b


Long Answer Type Questions
Q.89. Explain the various ways of traversing binary tree.
~mBZar Q´>r H$mo Q´>odg© H$aZo Ho$ {d{^ÝZ VarH$mo H$s ì¶m»¶m H$s{OE&
[2023]
OR
NP What is Tree Traversal? Explain various Tree Traversal
Operations with example. / Q´>r Q´>odg©b ³¶m h¡? CXmhaU Ho$
Ûmam {d{^ÝZ Q´>r Q´>odg©b Am°naoeZ H$mo g‘PmBE& [2022] 321

THREADED BINARY TREES / W«oS>oS> ~mBZar Q´>rµO


Short Answer Type Questions
Q.90. What is Threaded Binary Tree? Explain.
W«oS>oS> ~mBZar Q´>r ³¶m h¡? g‘PmBE& [2022] 325
HEAP: DEFINITION, INSERTION AND DELETION
hrn: n[a^mfm, B§ge©Z Am¡a {S>breZ
Long Answer Type Questions
Q.91. What is heap? Explain operations on heap data struc-
ture. / hrn жm h¡? hrn S>oQ>m ñQ´>ŠMa na Am°naoe§g H$mo g‘PmBE&
Short Answer Type Questions
1. What is heap? Explain types of heap data structure.
hrn жm h¡? hrn S>oQ>m ñQ´>ŠMa Ho$ àH$ma g‘PmBE& 326
 Review Questions 334

 Objective Questions 335

BRILLIANT'S / Programming Methodology & Data Structures / 28


P
UNIT

GRAPHS: GRAPH ADT, GRAPH REPRESENTATIONS


J«m’$: J«m’$ ADT, J«m’$ à{V{Z{YËd
Long Answer Type Questions
Q.92. What is a graph? Explain its types with examples.
J«m’$ жm h¡? BgHo$ àH$mam| H$mo CXmhaU g{hV g‘PmBE&
Short Answer Type Questions
1. What are the methods of Graph Representation?
J«m’$ àXe©Z H$s H$m¡Z gr {d{Y¶m§ h¡? [2022] 337
NPGRAPH TRAVERSALS- SEARCHING / J«m’$ Q´>¡dg©ëg- g{MªJ
Long Answer Type Questions
Q.93. What are the graph traversal methods?
J«m’$ Q´>¡dg©b {d{Y¶m§ жm h¢?
Short Answer Type Questions
1. Write a short note on: Graph Traversal
g§{jßV {Q>ßnUr {b{IE: J«m’$ Q´>¡dg©b [2023] 345
HASHING: INTRODUCTION, HASH TABLE, HASH
FUNCTIONS, OVERFLOW HANDLING
h¡qeJ: n[aM¶, h¡e Q>o~b, h¡e µ’§$Še§g, Amodaµâbmo h¢S>qbJ
Long Answer Type Questions
Q.94. What is hashing? Explain hash table and hash func-
tion with example. Also explain overflow handling.
h¡qeJ жm h¡? h¡e Q>o~b Am¡a h¡e ’§$ŠeZ H$mo CXmhaU g{hV
g‘PmBE& Amodaâbmo h¢S>qbJ H$mo ^r g‘PmBE&
Short Answer Type Questions
1. Explain hashing with suitable example.
h¡qeJ H$mo Cn¶w³V CXmhaU g{hV g‘PmBE& 352

BRILLIANT'S / Programming Methodology & Data Structures / 29


P
SORTING METHODS / gm°{Q>ªJ ‘oWS²>g
Long Answer Type Questions
Q.95. Write a program to implement Bubble Sort.
~~b gm°Q>© B§ßbr‘|Q> H$aZo hoVw EH$ àmoJ«m‘ {b{IE& [2022]

Short Answer Type Questions


1. What is sorting? Explain why is it needed?
gm°{Q>ªJ жm h¡? g‘PmBE {H$ BgH$s Amdí¶H$Vm жm| h¡? 357

Long Answer Type Questions


Q.96. Explain selection sort. / {gbo³eZ gm°Q>© H$mo g‘PmBE& 361

Long Answer Type Questions


Q.97. Explain insertion sort with example.
NP B§ge©Z gm°Q>© H$mo CXmhaU g{hV g‘PmBE&
Short Answer Type Questions
1. Explain Insertion Sort along with its working. Also
write its algorithm. / Insertion Sort H$mo BgH$s H$m¶©àUmbr
Ho$ gmW g‘PmBE& BgH$m EëJmo[aÏ‘ ^r {b{IE& [2023] 364

Long Answer Type Questions


Q.98. Explain quicksort with example.
p³dH$gm°Q>© H$mo CXmhaU g{hV g‘PmBE& [2023] 366

Long Answer Type Questions


Q.99. What is merge sort? Explain with example.
‘O© gm°Q>© жm h¡? CXmhaU g{hV g‘PmBE& 369
COMPARISON OF SORTING METHODS
gm°{Q>ªJ ‘oWS²>g H$s VwbZm
Short Answer Type Questions
Q.100. Compare all sorting methods showing their best, aver-
age and worst cases on the basis of time complexity.
g‘¶ H$s O{Q>bVm Ho$ AmYma na g^r gm°{Q>Jª ‘oWS²>g H$s CZHo$ gdm}ËV‘,
Am¡gV Am¡a g~go Iam~ ‘m‘bm| H$mo {XImVo hþE VwbZm H$s{OE& 373

BRILLIANT'S / Programming Methodology & Data Structures / 30


P
SEARCH TREES- BINARY SEARCH TREE, AVL TREE
gM© Q´>rµO- ~mBZar gM© Q´>r, AVL Q´>r
Long Answer Type Questions
Q.101. What are search trees? Explain BST and AVL tree with
examples.
gM© Q´>rµO жm h¢? BST Am¡a AVL Q´>r H$mo CXmhaU g{hV g‘PmBE&
Short Answer Type Questions
1. What is AVL Tree? Explain.
AVL Q´>r ³¶m h¡? g‘PmBE& [2023, 2022] 374
 Review Questions 377

 Objective Questions 378


UNIT

NP
INDIAN CONTRIBUTION TO THE FIELD: INNOVATIONS IN
INDIA, ORIGIN OF JULIA PROGRAMMING LANGUAGE / joÌ
‘| ^maVr¶ ¶moJXmZ: ^maV ‘| ZdmMma, Oy{b¶m àmoJ«mq‘J ^mfm H$s CËn{Îm
Long Answer Type Questions
Q.102. Write a short note on innovation in India in field of
computer technology. / H§$ß¶yQ>a àm¡Úmo{JH$s Ho$ joÌ ‘| ^maV ‘|
ZdmMma na EH$ g§{já ZmoQ> {b{IE& 380

INDIAN COMPUTER ENGINEERS WHO DESIGNED NEW


PROGRAMMING LANGUAGES / ^maVr¶ H§$ß¶yQ>a B§Or{Z¶a
{OÝhm|Zo ZB© àmoJ«mq‘J b¢½doO {S>OmBZ H$s
Long Answer Type Questions
Q.103. Discuss on engineers who designed new programming
languages.
ZB© àmoJ«mq‘J b¢½doOog {S>OmBZ H$aZo dmbo B§Or{Z¶g© na MMm© H$s{OE& 382

BRILLIANT'S / Programming Methodology & Data Structures / 31


P
OPEN-SOURCE PROGRAMMING LANGUAGES
AmonZ-gmog© àmoJ«mq‘J b¢½doOog
Long Answer Type Questions
Q.104. What are open source programming languages? Give
examples of some well-known open source program-
ming. / AmonZ gmog© àmoJ«mq‘J b¢½doOog жm h¢? Hw$N> à{gÕ AmonZ
gmog© àmoJ«mq‘J Ho$ CXmhaU Xr{OE& 385
DR. SARTAJ SAHNI - COMPUTER SCIENTIST - PIONEER OF
DATA STRUCTURE
S>m°. gaVmO gmhZr - H§$ß¶yQ>a d¡km{ZH$ - S>oQ>m ñQ´>ŠMa Ho$ AJ«Ur
Short Answer Type Questions
Q.105. Write a short biography of Mr. Sartaj Sahni.
NP lr gaVmO gmhZr H$s g§{jßV OrdZr {b{IE& [2023, 2022] 387
FAMOUS COMPUTER SCIENTISTS FROM INDIA
^maV Ho$ à{gÕ H§$ß¶yQ>a d¡km{ZH$
Long Answer Type Questions
Q.106. Discuss some of the famous computer scientists of In-
dia and their contribution. / ^maV Ho$ Hw$N> à{gÕ H§$ß¶yQ>a
d¡km{ZH$m| Am¡a CZHo$ ¶moJXmZ na MMm© H$s{OE& 389
 Review Questions 394

 Objective Questions 395

PRACTICAL 396

T-20 QUESTIONS 431

SOLVED QUESTION PAPERS 434




BRILLIANT'S / Programming Methodology & Data Structures / 32

You might also like