C++ Couse File 20-21
C++ Couse File 20-21
PROGRAMMING USING
C++
COURSEFILE Mrs.Prathima
ASSISTANT PROFESSOR
2020-2021
Department of
INFORMATION TECHNOLOGY
VIGNAN’S INSTITUTE OF MANAGEMENT AND TECHNOLOGY FOR
WOMENS
KONDAPUR (V), GHATKESAR (M) MEDCHAL DIST-501301
Sponsored by
Lavu Educational Society
(Approved by AICTE and Affiliated to JNT University, Hyderabad)
2020-21
COURSES FILE CONTENTS:
PART-A
1. Cover Page
2. Syllabus copy
3. Vision of the Department & Mission of the Department
4. PEOs
5. POs
6. Course objectives
7. Course outcomes
8. Instructional Learning Outcomes
9. Course mapping with PEO’S, PSO’s and PO’s
10. Class Time Table
11. Individual Time Table
12. JNTUH / Department calendar
13. Lecture Schedule
14. University Question papers of previous years
15. Unit-wise Question Bank mapping with blooms taxonomy levels and Cos
16. Unit –wise Quiz Bank
17. Assignment questions and mapping with blooms taxonomy levels and COs
18. References, Journals, websites and E-links if any
19. Quality Measurement/Control Sheets
1 a. Student List
2 b. MID-1 Results
3 c. MID-2 Results
4 d. Slow Learners
5 e. Time Table for makeup for Slow Learners
6 f. Actual Results
PART-B
2. Tutorials
3. Reference Books, Journals, websites and E-links if any
4. Appendix (Academic Year wise )
1 i. Additional Topics
2 ii. Improvements in Detailed Notes
3 iii. Improvements in Tutorials
4 iv. PPTS
Syllabus
OBJECT ORIENTED PROGRAMMING USING C++
UNIT - I
Object-Oriented Thinking: Different paradigms for problem solving, need for OOP paradigm,
differences between OOP and Procedure oriented programming, Overview of OOP concepts
Abstraction, Encapsulation, Inheritance and Polymorphism. C++ Basics: Structure of a C++
program, Data types, Declaration of variables, Expressions, Operators, Operator Precedence,
Evaluation of expressions, Type conversions, Pointers, Arrays, Pointers and Arrays, Strings,
Structures, References. Flow control statement- if, switch, while, for, do, break, continue, goto
statements. Functions - Scope of variables, Parameter passing, Default arguments, inline
functions, Recursive functions, Pointers to functions. Dynamic memory allocation and de-
allocation operators-new and delete, Preprocessor directives.
UNIT – II
C++ Classes and Data Abstraction: Class definition, Class structure, Class objects, Class scope,
this pointer, Friends to a class, Static class members, Constant member functions, Constructors
and Destructors, Dynamic creation and destruction of objects, Data abstraction, ADT and
information hiding.
UNIT – III
Inheritance: Defining a class hierarchy, Different forms of inheritance, Defining the Base and
Derived classes, Access to the base class members, Base and Derived class construction,
Destructors, Virtual base class. Virtual Functions and Polymorphism: Static and Dynamic
binding, virtual functions, Dynamic binding through virtual functions, Virtual function call
mechanism, Pure virtual functions, Abstract classes, Implications of polymorphic use of classes,
Virtual destructors.
UNIT – IV
C++ I/O: I/O using C functions, Stream classes hierarchy, Stream I/O, File streams and String
streams, Overloading operators, Error handling during file operations, Formatted I/O.
UNIT – V
Exception Handling: Benefits of exception handling, Throwing an exception, The try block,
Catching an exception, Exception objects, Exception specifications, Stack unwinding,
Rethrowing an exception, Catching all exceptions.
TEXT BOOKS:
1. The Complete Reference C++, 4th Edition, Herbert Schildt, Tata McGraw Hill.
2. Problem solving with C++: The Object of Programming, 4th Edition, Walter Savitch, Pearson
Education.
REFERENCES:
2. OOP in C++, 3rd Edition, T. Gaddis, J. Walters and G. Muganda, Wiley Dream Tech Press.
3. Object Oriented Programming in C++, 3rd Edition, R. Lafore, Galigotia Publications Pvt Ltd
3. Vision & Mission of the Department
To achieve value oriented and quality education with excellent standards on par with evolving
technologies and produce technocrats of global standards with capabilities of facing futuristic
challenges.
M1: To enrich advanced knowledge among students for reinforcing the domain knowledge and
develop capabilities and skills to solve complex engineering problems.
M2: To impart value based professional education for a challenging career in Computer Science
and Engineering.
M3: To transform the graduates for contributing to the socio-economic development and welfare
of the society through value based education
PEO2: To inculcate the capabilities to analyze, design and develop innovative solutions of
computer support systems for benefits of the society, by diligence and teamwork.
PO2 : Problem Analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences and Engineering sciences.
PO5 : Modern Tool Usage: Create, select and apply appropriate techniques, resources and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
PO6 : The Engineer and Society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
PO7 : Environment and Sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts and demonstrate the knowledge of, and need for
sustainable development.
PO8 : Ethics: Apply ethical principles and commit to professional ethics and responsibilities
and norms of the engineering practice.
PO9 : Individual and Team Work: Function effectively as an individual and as a member or
leader in diverse teams and in multidisciplinary settings.
PO11 : Project Management and Finance: Demonstrate knowledge and understanding of the
engineering management principles and apply these to one's own work, as a member and leader
in a team to manage projects and in multidisciplinary environments.
PO12 : Life-Long Learning: Recognize the need for and have the preparation and ability to
engage in independent and lifelong learning in the broadest context of technological change.
PSO1: Software Development: Ability to grasp the software development life cycle of software
systems and possess competent skill and knowledge of software design process.
PSO2: Industrial Skills Ability: Ability to interpret fundamental concepts and methodology of
computer systems so that students can understand the functionality of hardware and software
aspects of computer systems.
PSO3: Ethical and Social Responsibility: Communicate effectively in both verbal and written
form, will have knowledge of professional and ethical responsibilities and will show the
understanding of impact of engineering solutions on the society and also will be aware of
contemporary issues.
6. Course Objectives
The course should enable the students to:
III. Understand the concept of vectors, maps, stacks, queues and many more.
7. Course Outcomes:
CO 1: Understand the difference between the object oriented and Procedure oriented
programming.
CO 2: Apply the object-oriented programming approach in connection with C++.
CO 3: Examine and develop C++ programs with reusability and virtual functions.
CO 4 Assess the process of data file manipulations using C++ and handling exceptions.
CO 5: Design applications for a range of problems using object-oriented programming
techniques.
2. Implementation of left rotation operations on a vector and Implementation of maps using best
data Structure.
8. Understand unordered sets and sort both the list and print them alternatively with list.
PO2: Problem Analysis: Identify, formulate, review research literature, and analyze complex
engineering problems reaching substantiated conclusions using first principles of mathematics,
natural sciences and Engineering sciences.
PO5: Modern Tool Usage: Create, select, and apply appropriate techniques, resources, and
modern engineering and IT tools including prediction and modeling to complex engineering
activities with an understanding of the limitations.
PO6: The Engineer and Society: Apply reasoning informed by the contextual knowledge to
assess societal, health, safety, legal and cultural issues and the consequent responsibilities
relevant to the professional engineering practice.
PO7: Environment and Sustainability: Understand the impact of the professional engineering
solutions in societal and environmental contexts, and demonstrate the knowledge of, and need
for sustainable development.
PO8: Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
norms of the engineering practice.
PO9: Individual and Team Work: Function effectively as an individual and as a member or
leader in diverse teams, and in multidisciplinary settings.
PO11: Project Management and Finance: Demonstrate knowledge and understanding of the
engineering management principles and apply these to one's own work, as a member and leader
in a team, to manage projects and in multidisciplinary environments.
PO12:Life-long Learning: Recognize the need for and have the preparation and ability to
engage in independent and lifelong learning in the broadest context of technological change.
Blooms
Course Code Course Outcomes Taxonomy
Levels
Understand the difference between the object oriented and Procedure
CS305PC.1 Understand
oriented programming.
Apply the object-oriented programming approach in connection with
CS305PC.2 Apply
C++.
Examine and develop C++ programs with reusability and virtual
CS305PC.3 Analyze
functions.
Assess the process of data file manipulations using C++ and handling
CS305PC.4 Evaluate
exceptions.
Create
Design applications for a range of problems using object-oriented
CS305PC.5
programming techniques.
CO – PO Mapping
PSO1
PSO2
PSO3
PO10
PO11
PO12
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
CO
CS305PC.1 2 2 2 3 1 - - - - - - - - - -
CS305PC.2 3 2 1 2 2 - - - - - - - - - -
CS305PC.3 3 3 3 2 3 - - - - - - - - - -
CS305PC.4 2 3 2 3 3 - - - - - - - - - -
CS305PC.5 2 3 3 2 2 - - - - - - - - - -
PO/PSO
Average
2.4 2.6 2.2 2.4 2.2 - - - - - - - - - -
10. Class Time Table:
1 2 Break 3 4 Lunch 5 6 7
Day/Time 8:55- 9:45- 10:35- 10:40- 11:30- 12:20- 1:00- 1:50- 2:40-
9:45 10:35 10:40 11:30 12:20 1:00 1:50 2:40 3:30
ADE DS C++ COSM ← C++/DS LAB →
Monday
DS
Tuesday DS COA ADE LIBRARY C++ COSM
(Revision)
Day/ 1 2 3 4 5 6 7
Tim 8:55- 9:45- 10:40- 11.30- 1.00- 1.50- 2.40-
e 9:45 10:35 11.30 12.20 1.50 2.40 3.30
12.20-1.00
Tue C++
BREAK
LUNCH
Wed C++
Thu C++
Fri C++
S. No. Name of the Topics No. of Periods Method of Teaching Text books Referred
UNIT-I
1 Introduction 1 Black board & Chalk T1 & T2
Different paradigms
for problem solving,
2 1 Black board & Chalk T1 & T2
need for OOP
paradigm
Abstraction,
Encapsulation,
3 1 Black board & Chalk T1 & T2
Inheritance and
Polymorphism
differences between
OOP and Procedure
4 1 Black board & Chalk T1 & T2
oriented
programming
Structure of a C++
program, Data types,
5 1 Black board & Chalk T1 & T2
Declaration of
variables
Expressions,
Operators, Operator
6 Precedence, 1 Black board & Chalk T1 & T2
Evaluation of
expressions
Type conversions,
7 1 Black board & Chalk T1 & T2
Pointers, Arrays
Flow control
statement- if, switch,
8 while, for, do,break, 1 Black board & Chalk T1 & T2
continue, goto
statements
Flow control
statement- if, switch,
9 while, for, do,break, 1 Black board & Chalk T1 & T2
continue, goto
statements
10 Pointers and Arrays 1 Black board & Chalk T1 & T2
11 Strings 1 Black board & Chalk T1 & T2
Functions - Scope of
12 1 Black board & Chalk T1 & T2
variables, Parameter
passing, Default
arguments
inline functions,
13 1 Black board & Chalk T1 & T2
Recursive functions,
14 Pointers to functions 1 Black board & Chalk T1 & T2
Dynamic memory
15 1 Black board & Chalk T1 & T2
allocation
Dynamic memory
16 1 Black board & Chalk T1 & T2
allocation
Preprocessor
17 1 Black board & Chalk T1 & T2
directives
18 Test 1 Black board & Chalk T1 & T2
Class definition,
19 Class structure, Class 1 Black board & Chalk T1 & T2
objects, Class scope
Class definition,
20 Class structure, Class 1 Black board & Chalk T1 & T2
objects, Class scope
this pointer, Friends
21 1 Black board & Chalk T1 & T2
to a class
Static class members,
22 Constant member 1 Black board & Chalk T1 & T2
functions
Constructors and
23 1 Black board & Chalk T1 & T2
Destructors
Dynamic creation and
24 1 Black board & Chalk T1 & T2
destruction of objects
25 Data abstraction 1 Black board & Chalk T1 & T2
ADT and information
26 1 Black board & Chalk T1 & T2
hiding
27 Sample Programs 1 Black board & Chalk T1 & T2
28 Sample Programs 1 Black board & Chalk T1 & T2
29 Test 1 Black board & Chalk T1 & T2
UNIT-III
30 Inheritance 1 Black board & Chalk T1 & T2
Different forms of
31 1 Black board & Chalk T1 & T2
inheritance
Defining the Base
32 1 Black board & Chalk T1 & T2
and Derived classes
Base and Derived
33 class construction, 1 Black board & Chalk T1 & T2
Destructors
34 Virtual base class 1 Black board & Chalk T1 & T2
Virtual Functions and
35 Polymorphism-Static 1 Black board & Chalk T1 & T2
and Dynamic binding
36 virtual functions 1 Black board & Chalk T1 & T2
Dynamic binding
37 through virtual 1 Black board & Chalk T1 & T2
functions
Virtual function call
38 1 Black board & Chalk T1 & T2
mechanism
39 Pure virtual functions 1 Black board & Chalk T1 & T2
40 Abstract classes 1 Black board & Chalk T1 & T2
41 Virtual destructors 1 Black board & Chalk T1 & T2
42 Programs 1 Black board & Chalk T1 & T2
43 Test 1 Black board & Chalk T1 & T2
UNIT-IV
44 I/O using C functions 1 Black board & Chalk T1 & T2
Stream classes
45 1 Black board & Chalk T1 & T2
hierarchy
46 Stream I/O 1 Black board & Chalk T1 & T2
File streams and
47 1 Black board & Chalk T1 & T2
String streams
Overloading
48 1 Black board & Chalk T1 & T2
operators
Error handling during
49 1 Black board & Chalk T1 & T2
file operations
50 Formatted I/O. 1 Black board & Chalk T1 & T2
51 Programs 1 Black board & Chalk T1 & T2
52 Test 1 Black board & Chalk T1 & T2
UNIT-V
Exception Handling:
53 Benefits of exception 1 Black board & Chalk T1 & T2
handling
Throwing an
54 1 Black board & Chalk T1 & T2
exception
try block, Catching
55 1 Black board & Chalk T1 & T2
an exception
56 Exception objects 1 Black board & Chalk T1 & T2
Exception
57 1 Black board & Chalk T1 & T2
specifications
Stack unwinding,
58 Rethrowing an 1 Black board & Chalk T1 & T2
exception
Catching all
59 1 Black board & Chalk T1 & T2
exceptions
60 Programs 1 Black board & Chalk T1 & T2
61 Test 1 Black board & Chalk T1 & T2
LESSON PLAN
(VMTW/ACD-I/21)
Academic Year : 2020-2021
Year & Semester : II-I
Branch : IT
PROGRAMMING USING C++
Name of Faculty : Mrs.Prathima
UNI Topic of Learning Out- Teach- Hours Total No. Expected date of Re-
T Syllabus comes ing Re- of Hours completion (for view/
to be cov- Mode quired (Cumula- each unit) By Re-
ered (BB/ tive) HOD marks
PPT/ (By
As per Actual
Video/ HOD)
Demo
L timeta date of
T ble comple-
tion
1 Different Understand BB 1 2 18-10-
paradigms 21
for prob-
lem solv-
ing
need for Understand BB 1 2 21-10-
OOP para- 21
digm
differences Apply BB 1 3 22-10-
between 21
OOP and
Procedure
oriented
program-
ming,
differences Apply BB 1 4 23-10-
between 21
OOP and
Procedure
oriented
program-
ming,
Abstrac- Apply BB 1 5 25-10-
tion, and 21
Polymor-
phism.
Encapsu- Apply BB 1 6 26-10-
lation, In- 21
heritance
Polymor- Apply BB 1 7 26-10-
phism 21
Structure Analyze BB 1 8 27-10-
of a C++ 21
program,
Data
types,
Declara-
tion of vari-
ables
Expres- Analyze BB 1 9 28-10-
sions, Op- 21
erators,
Operator
Prece-
dence
Evaluation Understand BB 1 10 29-10-
of expres- 21
sions
Type con- understand BB 1 11 30-10-
versions 21
Pointers, understand BB 1 12 1-11-
Arrays 21
Pointers apply BB 1 13 2-11-
and Ar- 21
rays
Strings Illustrate BB 1 14 3-11-
21
Structures Apply BB 1 15 5-11-
21
Refer- Understand BB 1 16 6-11-
ences. 21
Flow con-
trol state-
ment- if,
switch,
while, for,
do, break
continue, Un- BB 1 17 8-11-
goto state- der- 21
ments
stand
Functions - Apply BB 1 18 9-11-
Scope of 21
variables
Parameter
passing,
Default ar-
guments,
inline func-
tions
Recursive Understand BB 1 19 10-11-
functions and apply 21
Dynamic
memory
allocation
and deallo-
cation
, Pre- Understand BB 1 20 11-11-
processor and apply 21
directives.
Unit I - 21 12-11-
test 21
2 Class defi- Understand BB 1 22 13-11-
nition 21
Class Analyze BB 1 23 15-11-
structure 21
Class ob- Apply BB 1 24 16-11-
jects 21
Class Analyze BB 1 25 17-11-
scope 21
This Analyze BB 1 26 18-11-
pointer, 21
Friends to
a class
Static Understand BB 1 27 20-11-
class 21
members
Constant illustrate BB 1 28 22-11-
member 21
functions
Construc- Apply BB 1 29 23-11-
tors and 21
Destruc-
tors
Construc- understand BB 1 30 24-11-
tors and 21
Destruc-
tors
Construc- understand BB 1 31 25-11-
tors and 21
Destruc-
tors
Dynamic understand BB 1 32 26-11-
creation 21
and de-
struction of
objects
Dynamic apply BB 1 33 27-11-
creation 21
and de-
struction of
objects
Data ab- Analyze BB 1 34 29-11-
straction, 21
ADT and
information
hiding
Defining a Apply BB 1 35 30-11-
class hier- 21
archy
Different apply BB 1 36 1-12-
forms of 21
inheritance
Defining Understand BB 1 37 2-12-
the Base 21
and De-
rived
classes
Access to Understand BB 1 38 3-12-
the base 21
class
3
members
Base and Understand BB 1 39 4-12-
Derived 21
class con-
struction
Destruc- Understand BB 1 40 6-12-
tors, 21
Virtual Understand BB 1 41 7-12-
base class 21
Virtual Understand BB 1 42 8-12-
base class 21
Static and apply BB 1 43 9-12-
Dynamic 21
binding
virtual Understand BB 1 44 10-12-
functions 21
Dynamic apply BB 1 45 11-12-
binding 21
through
virtual
functions,
Virtual Analyze BB 1 46 20-12-
function 21
call mech-
anism
Pure vir- apply BB 1 47 21-12-
tual func- 21
tions
Abstract apply BB 1 48 22-12-
classes 21
Abstract Analyze BB 1 49 23-12-
classes 21
Implica- Analyze BB 1 50 24-12-
tions of 21
polymor-
phic use of
classes
Virtual de- Understand BB 1 51 27-12-
structors 21
4 I/O using Analyze BB 1 52 28-12-
C func- 21
tions
I/O using Explain BB 1 53 29-12-
C func- 21
tions
I/O using Understand BB 1 54 30-12-
C func- 21
tions
Stream Explain BB 1 55 31-12-
classes hi- 21
erarchy
Stream Explain BB 1 56 03-01-
classes hi- 22
erarchy
Stream Understand BB 1 57 04-01-
classes hi- 22
erarchy
Stream I/O apply BB 1 58 05-01-
22
Stream I/O apply BB 1 59 06-01-
22
File Analyze 60 07-01-
streams 22
and String
streams
Overload- Understand BB 1 61 08-01-
ing opera- 22
tors
Overload- apply BB 1 62 10-01-
ing opera- 22
tors
Error han- Analyze BB 1 63 11-01-
dling dur- 22
ing file op-
erations
Error han- Understand BB 1 64 12-01-
dling dur- 22
ing file op-
erations
Formatted Understand BB 1 65 15-01-
I/O. 22
Formatted Apply BB 1 66 17-01-
I/O. 22
5 Benefits of Understand BB 1 67 18-01-
exception 22
handling
Throwing Understand BB 1 68 19-01-
an excep- 22
tion
Throwing apply BB 1 69 20-01-
an excep- 22
tion
The try Analyze BB 1 70 21-01-
block 22
The try Understand BB 1 71 22-01-
block 22
Catching Understand BB 1 72 24-01-
an excep- 22
tion
Exception Understand BB 1 73 25-01-
objects
22
Exception Apply BB 1 74 26-01-
specifica- 22
tions
Stack un- Understand BB 1 75 27-01-
winding 22
Rethrow- Apply BB 1 76 28-01-
ing an ex- 22
ception,
Catching
all excep-
tions
UNIT V 77 29-01-
Test 22
Model Question Papers 1
Discussion
Question Bank Discussion 1
Important Question Discus- 1
sion
L-Lecture T-Tutorial
P-Practical
Signature of Lecturer
Signature of HOD
Date:
15. Unit-wise question bank mapping with blooms taxonomy levels and co’s
PART – A (Short Answer Questions)
Blooms Course
Q. No Questions
Taxonomy Outcome
Level
UNIT – I
1 Knowledge 1
What are different object oriented Paradigm?
2 Knowledge 2
What is difference between Object oriented and project oriented
programming?
3 Knowledge 2
Define abstraction,encapsulation,inheritance and polymorphism?
4 Understand 2
What are applications of OOPS?
5 Understand 2
What are different I/O operators we use in C++?
6 Knowledge 2
Why we use iostream.h and Namespace in C++?
7 Understand 2
What is inline function?
8 Understand 2
Why we use new and delete operator?
9 Understand 2
1 Knowledge 8
Define Class and object
2 Knowledge 8
What is a friend function?
3 Knowledge 8
What do you mean by static class?
4 Knowledge 10
What do you mean by constructor and destructor?
5 Understand 8
What is data abstraction?
6 Apply 8
What is data hiding?
UNIT – III
1 Knowledge 5
What do you mean by inheritance?
2 Knowledge 5
What are the different types of inheritance?
3 Understand 5
What do you mean by virtual class?
4 Apply 5
Discuss about static and dynamic binding?
5 Apply 5
What is virtual function?
6 Apply 5
What is polymorphism?
7 Understand 5
What is abstract class?
8 Knowledge 5
What is virtual destructor?
UNIT – IV
1 Knowledge 7
What do you understand by stream classes?
2 Understand 7
State the different Unformatted input/output Operations?
3 Understand 7
State Formatted Console I/O Operations?
4 Understand 7
Why we use getline() and write() functions?
5 Knowledge 7
What is the role of iomanip file?
6 Apply 7
What are the different steps of file operations?
7 Understand 7
What do you mean error handling during file operations?
8 Understand 7
What are input and output streams for files operation?
UNIT – V
1 Understand 2
What do you mean by exception handling?
2 Understand 11
Describe the role of keywords try,throw and catch in exception
handling?
3 Understand 11
When should a program throw an exception?
4 Knowledge 11
When do we used multiple catch handlers?
5 Understand 11
What do you mean by rethrowing an exception
8 Understand 2
Describe the role of keywords try,throw and catch in exception
handling?
9 Understand 6
When should a program throw an exception?
10 Understand 4
When do we used multiple catch handlers?
11 Apply
3
What do you mean by rethrowing an exception
UNIT – II
1 Apply 8
Explain the structure of class and object in C++ with a example?
2 Knowledge 10
Explain the concept of use of constructor and destructor in C++ with an
example?
3 Understand 8
Explain the concept of friend function and its use in C++?
4 Knowledge
10
Explain the concept of Data Abstraction and information hiding?
5 Apply 10
Explain the different access specifier which we use in C++?
UNIT – III
1 Explain the concept of inheritance with an example? Apply 5
UNIT –
IV
1 What is a file mode ?describe the various file mode options available Understand 7
3 What is the basic difference between manipulators and ios member Apply 7
functions in implementation? Give examples.
4 Explain the different sets for Stream classes for console operations? Understand 7
5 How is cout able to display various types of data without any special Understand 7
instructions?
6 Explain the different sets of file stream classes Understand 7
UNIT – V
1 Apply 11
Explain mechanism of exception handling.
2 Understand 11
What is an exception specification? When is it used?
3 Understand 11
Explain in detail about rethrowing an exception?
4 Understand 11
What do you mean by stack unwinding?
1. If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const
member function)?
a. const X* const
b. X* const
c. X*
d. X&
a. Storage
b. Virtual
c. Friend
d. Wrapper
c. When type requested for new operation is considered bad, thisexception is thrown
a. float
b. string
c. int
d. wchar_t
a. int ~Country()
b. void Country()
d. void ~Country()
d. Type-less language
a. abstract
b. Virtual
c. Dynamic
d. Typeid
8. Which of the following is the most preferred way of throwing and handling exceptions?
d. Throw the pointer value and provide catch for the pointer type.
b. the variable must always be the letter i when using a for loop
b. Class definitions
c. Function definitions
d. Template definitions
15. Which of the STL containers store the elements contiguously (in adjacent memory
locations)?
a. std::vector
b. std::list
c. std::map
d. std::set
a. std::bad_creat
b. std::bad_alloc
c. std::bad_cast
d. std::bad_typeid
18. What is the difference between overloaded functions and overridden functions?
19. Which one of the following is not a valid reserved keyword in C++
a. Explicit
b. Public
c. Implicit
d. Private
a. enumeration
b. iteration
c. culmination
d. pass through
UNIT-II
23. If class A is friend of class B and if class B is friend of class C, which of the following is
true?
a. Class C is friend of class A
b. Class A is friend of class C
c. Class A and Class C do not have any friend relationship
d. None of the above
37. How many copies of a class static member are shared between objects of the class?
a. A copy of the static member is shared by all objects of a class
b. A copy is created only when at least one object is created from that class
c. A copy of the static member is created for each instntiation of the class
d. No memory is allocated for static members of a class
38. Which looping process checks the test condition at the end of the loop?
a. for
b. while
c. do-while
d. no looping process checks the test condition at the end
40. Which of the following correctly describes the meaning of‘namespace’ feature in C++?
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces refer to space between the names in a program
c. Namespaces refer to packing structure of classes in a program.
d. Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.
UNIT-III
41. Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces refer to space between teh names in a program
c. Namespaces refer to space between the names in a program
d. namespaces provide facilities for organizing the names in a program to avoid name
clashes
49. Which of the following language feature is not an access specifier in C++?
a. public
b. private
c. C protected
d. internal
53. Which of the following library function below by default aborts the program?
a. Terminate()
b. end()
c. Abort()
d. exit()
54. If a member needs to have unique value for all the objects of that same class, declare
the member as
a. Global variable outside class
b. Local variable inside constructor
c. Static variable inside class
d. Dynamic variable inside class
55. Value of ix+j, if i,j are integer type and ix long type would be
a. integer
b. float
c. long integer
d. double percision
56. Which of the following below can perform conversions between pointers to related
classes?
a. cast_static
b. dynamic_cast
c. static_cast
d. cast_dynamic
58. Vtables
a. creates a static table per class
b. creates a static table per object
c. creates a dynamic table per class
d. creates a dynamic table per object
59. When class B is inherited from class A, what is the order in which the constructors of
those classes are called
a. Class A first Class B next
b. Class B first Class A next
c. Class B’s only as it is the child class
d. Class A’s only as it is the parent class
60. In a group of nested loops, which loop is executed the most number of times?
a. the outermost loop
b. the innermost loop
c. all loops are executed the same number of times
d. cannot be determined without knowing the size of the loops
UNIT-IV
61. What is the Difference between struct and class in terms of Access Modifier?
a. By default all the struct members are private while by default class members are public.
b. By default all the struct members are protected while by default class members are
private.
c. By default all the struct members are public while by default class members are private.
d. By default all the struct members are public while by default class members are protected.
68. Which of the following functions below can be used Allocate space for array in
memory?
a. calloc()
b. malloc()
c. Realloc()
d. both a and b
72. If there is more than one statement in the block of a for loop, which of the following
must be placed at the beginning and the ending of the loop block?
a. parentheses ( )
b. braces { }
c. brackets [ ].
d. arrows <>
73. Which of the following members do get inherited but become private members in child
class
a. Public
b. Private
c. Protected
d. All the above
74. Which looping process is best used when the number of iterations is known?
a. for
b. while
c. do-while
d. all looping processes require that the iterations be known
76. Which of the following is the most common way of implementing C++?
a. C++ programs are directly compiled into native code by a compiler
b. C++ programs are first compiled to intermediate code by a compiler and then executed by a
virtual machine
c. C++ programs are interpreted by an interpreter
d. A C++ editor directly compiles and executes the program
77. What is the implicit pointer that is passed as the first argument for nonstatic member
functions?
a. ‘self’ pointer
b. std::auto_ptr pointer
c. ‘Myself’ pointer
d. ‘this’ pointer
79. Which of the following is not a valid conditional inclusions in preprocessor directives
a. #ifdef
b. #ifundef
c. #endif
d. #elif
80. Which of the following is not a standard exception built in C++.
a. std::bad_creat
b. std::bad_alloc
c. std::bad_cast
d. std::bad_typeid
UNIT-V
81. If a member needs to have unique value for all the objects of that same class, declare
the member as
a. Global variable outside class
b. Local variable inside constructor
c. Static variable inside class
d. Dynamic variable inside class
83. Which of the following functions below can be used Allocate space for array in
memory?
a. calloc()
b. malloc()
c. Realloc()
d. both a and b
84. Which of the following is not a valid conditional inclusions in preprocessor directives
a. #ifdef
b. #ifundef
c. #endif
d. #elif
86. Minimum number of temporary variable needed to swap the contents of 2 variables is:
a. 1
b. 2
c. 3
d. 0
88. C++ provides facility to specify that the compiler should match function calls with the
correct definition at the run time. This process is called as
a. Static binding
b. Dynamic Binding
Class1&test(Class1 obj)
{
Class1 *ptr = new Class1();
………
return ptr;
}
a. object of Class1
b. reference to ptr
c. reference of Class1
d. object pointed by ptr
17. Assignment questions
1. The Complete Reference C++, 4th Edition, Herbert Schildt, Tata McGraw Hill.
2. Problem solving with C++: The Object of Programming, 4th Edition, Walter Savitch, Pearson
Education.
2. OOP in C++, 3rd Edition, T. Gaddis, J. Walters and G. Muganda, Wiley Dream Tech Press.
3. Object Oriented Programming in C++, 3rd Edition, R. Lafore, Galigotia Publications Pvt Ltd.
Websites:-
1.https://www.geeksforgeeks.org/object-oriented-programming-in-cpp/
2.https://www.tutorialspoint.com/cplusplus/cpp_object_oriented.htm
3.https://beginnersbook.com/2017/08/cpp-oops-concepts/
19. QUALITY MEASUREMENT/CONTROL SHEETS:
A. STUDENT LIST
VIGNAN'S INSTITUTE OF MANAGEMENT & TECHNOLOGY FOR WOMEN
STUDENTS ROLL LIST
II-I B.TECH IT 2020-21
Hall Ticket
S.No Name of the Candidate
No
19UP1A1201 A.Sangeetha
1
19UP1A1202 Adelli Samyuktha
2
19UP1A1203 APURI SOWMYA
3
19UP1A1204 BADDAM SHREYA
4
19UP1A1205 BASHETTY ANUSHA
5
19UP1A1206 Beeravally Sai Josmitha
6
19UP1A1207 Boddu Sathwika
7
19UP1A1208 Chalapati Lakshmi sahiti
8
19UP1A1209 Gurram sneha reddy
9
19UP1A1210 Joginipelly Sahithya
10
19UP1A1211 KASULA KEERTHI REDDY
11
19UP1A1212 Kethepalli Guru Roopika
12
19UP1A1213 komuravelly Ashwitha
13
19UP1A1214 Kothakapu Niharika Reddy
14
19UP1A1215 K.S.Krishna
15
19UP1A1216 Lingampally Nishitha Reddy
16
Date: 28.12.2020
(AN)
Time: 60mins Max. Marks: 20M
2 X 10=20M
Answer all Questions
Sl. Blooms Taxon- Marks
CO
No Question omy
Mapping
. Level
1. a)Describe the object oriented programming fea-
1 tures of C++? C01 R 10
b) Describe various loop statements?
OR
2.Write short notes for the following:
OR
Part-B
Fill in the Blanks
1.
The scope resolution operator is _______________
2. Which data type is used to represent the absence of parameters? _____
3.
A ______ is a special member function used to initialize the data members of a class.
4.
The default access for members of a class is____ .
5. A ______ is a function that invokes itself.
6.
Run-time or dynamic allocation of memory may be done using the _____ operator .
7.
A _______is a set of instance or values.
8. C++ programming language was designed and developed by ______ at _______.
A program can use the address of any variable in an expression, except variables declared with the
9. ______storage class.
A constructor with default arguments for all its parameters is called a _______
10.constructor.)
II B.Tech I Semester I-Mid Examinations, Mar-2021
Date: 02.03.2021
(AN)
Time: 60mins Max. Marks: 20M
2 X 10=20M
Answer all Questions
Sl. Blooms Tax- Marks
CO
No Question onomy
Mapping
. Level
1.Describe the following with suitable examples :
a. virtual functions
1 b. Pure virtual functions C01 A 10
c. abstract class
OR
2.a.Write about operator overloading with example
program.
3.a. Draw the hierarchy of file stream classes and ex- C02 R
plain various file stream classes needed for file manip-
ulations?
3 10
b. Write about unformatted I/O operations.
OR
2 If a class have all the abstract methods the class will be known as ___________ [ ]
Anonymous
A Abstract class B C Base class D Derived class
class
3 . What is an exception? [ ]
Problem arising
Problem arising Problem in syn-
A during compile B C D Problem in IDE
during runtime tax
time
4 How many catch blocks can a single try block can have? [ ]
Only 1 Only 2
As many as re-
A B C Maximum 127 D
quired
Part-B
Fill in the Blanks
1.
____________feature of OOP is exhibited by the function overriding.
2.
____________ keyword is used to overload an operator.
3.
______are the two blocks that are used to check error and handle the error.
4.
Syntax for delete an object________
5. _____function is used to position back from the end of file object.
6.
_____ stream class is to only write on files .
7. It is not possible to combine two or more file opening mode in open () method.(TRUE/
FALSE)___
8.
____ is used to throw a exception.
9.
A class is called as abstract base class if it has a _______________ function.
Format flags may be combined using______
10.
1 19UP1A1201 4 9 5 18
2 19UP1A1202 8 10 5 23
3 19UP1A1203 8 9 5 22
4 19UP1A1204 7 9 5 21
5 19UP1A1205 4 9 5 18
6 19UP1A1206 5 8 5 18
7 19UP1A1207 5 5
8 19UP1A1208 7 9 5 21
9 19UP1A1209 5 5 5 15
10 19UP1A1210 7 10 5 22
11 19UP1A1211 8 7 5 20
12 19UP1A1212 7 9 5 21
13 19UP1A1213 8 10 5 23
14 19UP1A1214 5 10 5 20
15 19UP1A1215 6 10 5 21
16 19UP1A1216 6 10 5 21
17 19UP1A1217 6 9 5 20
18 19UP1A1218 7 10 5 22
19 19UP1A1219 5 5
20 19UP1A1220 6 10 5 21
21 19UP1A1221 9 10 5 24
22 19UP1A1222 3 10 5 18
23 19UP1A1223 7 10 5 22
24 19UP1A1224 6 10 5 21
25 19UP1A1225 7 10 5 22
26 19UP1A1226 4 10 5 19
27 19UP1A1227 5 9 5 19
28 19UP1A1228 7 10 5 22
29 19UP1A1229 6 9 5 20
30 19UP1A1230 6 9 5 20
31 19UP1A1231 6 10 5 21
32 19UP1A1232 5 10 5 20
33 19UP1A1233 6 9 5 20
34 19UP1A1234 6 10 5 21
35 20UP5A1201 5 9 5 19
VIGNAN'S INSTITUTE OF MANAGEMENT & TECHNOLOGY FOR WOMEN
1 19UP1A1201 4 9 5 18
2 19UP1A1202 10 10 5 25
3 19UP1A1203 5 9 5 17
4 19UP1A1204 7 9 5 22
5 19UP1A1205 7 9 5 19
6 19UP1A1206 6 8 5 19
7 19UP1A1207 6 5 19
8 19UP1A1208 8 9 5 20
9 19UP1A1209 4 5 5 16
10 19UP1A1210 9 10 5 24
11 19UP1A1211 7 7 5 18
12 19UP1A1212 7 9 5 21
13 19UP1A1213 10 10 5 25
14 19UP1A1214 6 10 5 19
15 19UP1A1215 8 10 5 22
16 19UP1A1216 5 10 5 20
17 19UP1A1217 5 9 5 18
18 19UP1A1218 5 10 5 19
19 19UP1A1219 10 5 25
20 19UP1A1220 5 10 5 16
21 19UP1A1221 9 10 5 23
22 19UP1A1222 3 10 5 14
23 19UP1A1223 9 10 5 24
24 19UP1A1224 10 10 5 25
25 19UP1A1225 7 10 5 21
26 19UP1A1226 3 10 5 15
27 19UP1A1227 5 9 5 16
28 19UP1A1228 6 10 5 19
29 19UP1A1229 5 9 5 18
30 19UP1A1230 4 9 5 14
31 19UP1A1231 4 10 5 16
32 19UP1A1232 5 10 5 19
33 19UP1A1233 5 9 5 17
34 19UP1A1234 5 10 5 15
35 20UP5A1201 4 9 5 15
F. ACTUAL RESULTS
21. Tutorials:
Tutorial-1
1. What is the difference between fundamental data types and derived data types? Explain
with examples.
2. What is the purpose of a header file in a program?
3. What main integer types are offered by C++?
4. Explain the usage of following with the help of an example: (i) constant (ii) reference
(iii) variable (iv) union
5. How many ways can a variable be initialized into? Give examples for each type of
initialization.
6. How are the following two statements different? charpcode = 75; char pcode = ‘K’;
How are the following two statements different? char pcode = 75; short pcode = 75;
7. Explain the impact of access modifier const over variables. Support your answer with
examples.
8. What are arithmetic operators in C++? Distinguish between unary and binary arithmetic
operators. Give examples for each of them.
9. What is the function of increment/decrement operators? How many varieties do they
come in? How are these two varieties different from one another?
10. What is the difference between Type Casting and Automatic Type conversion? Also,
give a suitable C++ code to illustrate both.
11. Discuss major OOP concepts briefly.
12. What are programming paradigms? Give names of some popular programming
paradigms.
13. What are the shortcomings of procedural and modular programming approaches?
14. How are classes and objects implemented in C++?
15. What is the significance of private, protected and public specifiers in a class?
Tutorial -2
1. What is an array? What is the need for array?
2. What do you understand by two-dimensional arrays? State some situation that can be
easily represented by two- dimensional arrays.
3. What is meant by unsized array initialization in C++? What are its benefits?
4. What do you meant by function prototyping? Write down the advantages of function
prototypes in C++.
5. How is call-by-value method of function invoking different from call-by-reference
method? Give appropriate examples supporting your answer.
6. Discuss the similarities and difference between global and local variables in terms of
their lifetime and scope
TEXT BOOKS:-
1. The Complete Reference C++, 4th Edition, Herbert Schildt, Tata McGraw Hill.
2. Problem solving with C++: The Object of Programming, 4th Edition, Walter Savitch, Pearson
Education.
REFERENCES:
2. OOP in C++, 3rd Edition, T. Gaddis, J. Walters and G. Muganda, Wiley Dream Tech Press.
3. Object Oriented Programming in C++, 3rd Edition, R. Lafore, Galigotia Publications Pvt Ltd.
Journals:-
2. Design and Implementation of a Relational DBMS for Microcomputers F. Cesarini and G. Soda
23. Appendix (Academic Year wise)
A. Additional Topics
B. Improvements in Detailed Notes
C. Improvements in Tutorials
D. PPTS
Vignans Institute of Management and Technology for Women
Subject: C++
19UP1A1207
1 Boddu Sathwika
19UP1A1222 Pathipati.shilpa
4
19UP1A1207
1 Boddu Sathwika
Pendam
19UP1A1223 Vineetha
3
19UP1A1222 Pathipati.shilpa
4
Srinidhi
19UP1A1230
5 Tirukovela
Signature of the
Faculty
Questions:
References:
TEXT BOOKS:-
1. The Complete Reference C++, 4th Edition, Herbert Schildt, Tata McGraw Hill.
2. Problem solving with C++: The Object of Programming, 4th Edition, Walter Savitch, Pearson
Education.
REFERENCES:
1. The C++ Programming Language, 3rd Edition, B. Stroutstrup, Pearson Education.
2. OOP in C++, 3rd Edition, T. Gaddis, J. Walters and G. Muganda, Wiley Dream Tech Press.
3. Object Oriented Programming in C++, 3rd Edition, R. Lafore, Galigotia Publications Pvt Ltd.