Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
17 views
15 pages
C++ 5 Year
Compilation of previous 5 years of questions
Uploaded by
farzimanushya
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save c++ 5 year For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
17 views
15 pages
C++ 5 Year
Compilation of previous 5 years of questions
Uploaded by
farzimanushya
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save c++ 5 year For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 15
Search
Fullscreen
‘ ROI NO. cece cesses E-1/125/18 I Semester Examination, December, 2018 M.Sc. INFORMATION TECHNOLOGY Paper | (Object Oriented Programming with C++) Time : 3 Hours ] [ Max. Marks : 100 Note : Question Paper comprises of 3 sections. Section A is objective type/multiple choice of 10 marks. Section B is short answer type of 30 marks. Section C is long answer type of 60 marks. 5 SECTIONA 1x10=10 (Objective Type Questions) 1. Which of the following is not the member of class ? (a) Static function (b) Friend function | (c) Constant function (d) Virtual function 2. Which allows you to create a derived class that inherits properties from more than one base class ? (a) Multilevel inheritance soon Baateett2y (b) Muttipte inheritance 1a (©) Hybrid Inheritance 7 The address of a variable temp of type oat Is : (@) Hierarchical Inheritance (a) stem, (b) Gctemp (©) Mloatétemp (a) Moat tempé 8. Default value of static variable is Zi @o oI What ts the output of the following code : char symbol{3} = {a (0) Garbage value (4) Compiter dependent for (int index=0; ind&x<3; index+s) 4, The explicit keywo ‘cout << symbol lindex abe (6) “aber (o) abe. a Is an optional decoration for the constructors that takes exactly argument. (@) No argument —(b) Two (4) None of the above (c) Three 9. Which functions allows to change the location (©) One of the get and put positions ? 5. The operator that cannot be overloaded ig : (2) se) andl sp() "(8 Seg) ana seep) Ge Os (6) gog() and gop() (4) seekg{) and seekpt) 0 a 10. To perform stream 1/0 with disk ies in Cee, 6. Overloading the function operator : you should : - () requires 1 (a) open and close files as in procedural 0) Fequires a class with an overload, led] operator. languages (b) use classes derived from ios (use C language library functions to read and write data (@) include the IOSTREAM.II header file. (}_ allows you to create objects that act | syntactically like functions (@ usuany rake use of a constru ictor that arguments, PTO. E-1/128/18Discuss the use of enumeration data type in CH, Unit or 5. Differentiate between private and protected _ specifier with example. Or Explain null and default constructor. Unit IV Discuss with example. E-1/125/18 t54 or How pure virtual functions ts differ from virtual functions ? Unit v }. List and explain various functions required for random access file operations. Or Write C++ program to retrieve information from the file. SECTIONC 125-60 (Long Answer Type Questions) Unit r 1, Define Object-oriented programming and explain feature of Object-oriented programming. How it is different than procedure-oriented programm- ing? or 4, iia Differentiate between break, continue and goto statement in C++, Unit 2. What ts inline function ? In which situation inline function may not work ? Hew does an E-1/125/18 PTO.4 161 Inline function may difer from a preprocessor macro ? Write program using inline function to find largest of three numbers, Or Discuss nesting of structure and union with the help of suitable example. Unit 1 What is the ambiguity that aries in multiple inheritance ? How it can be overcome ? Explain with example. Or What is multi-dimension array ? Write a C++ program to count total number of duplicate elements in an array. Unit IV Write a C++ program demonstrate use of the pure virtual function with the use of base and derived classes. Or Why friend function is required to overload binary operator ? P
x ©) this.x (0 “this (@ “this-x, 8. Avirtual member funetion is a mem ber Funct, that can : qi (a) Be overridden by a subclass (0) Be derived from another class (6) Move to any class (@) None of them, 9. tos::trune is used for ? £9) I the fle ts opened for output operations and its already existed, no action is taken, 1) I the fle is opened for output operations and its already existed, its previous content 'S deleted and replaced ed by the new one Panasyig Note: 158 sons 1 operat 4 for output - fo) tf te file 19 opened for oT COPY sted, he nly existed —o e current position oe (W)lostier (a) ioszcurr (@ fosz:current. (otosseur sectios oo sane ge Qn tog estos. re oe pga to chek get ber : see three numbers using nested if-else Sorcment Als explain or biferenite between break and continue statement with stable example. tie 2, What are the benefits of inline function ? Explain it. ee Or How passing reference arguments into function? Explain with example. F-1/125/19 PTO,16) 9. Deseribe memory ‘OFY allocation suitable esampte, 1 obec a wi Write any C++ program t plain pointer to oly (© object with suttat : table exampre What are Cx, "Pat are C+ stream class ? Explain i, Or Explain manipulators with example SECTIONC (Long Answer Type Quest : ype Questions) Note : Answer the following questions, examples, oe 12x$=60, Or Describe the control structures with examples, 2. Write a : Write a C++ program to store and display the ‘cords (rolino, name, marks of any three F-1/125/19 a ee in sees of te total mats fF 86 mean by funetion overloading ? 18 what do function ts useful vrteh situation overloaded Teaser ? Explain with suitable example ow static data member and stati member functions are differences from normal data viper and function ? Explain with suitable examples, or ‘What are the benefits of constructor ? Describe types of constructor with example. 4, Explain the following (a) This pointer, _(b) Friend class. Or Describe the concept of polymorphism with suitable example in details. 5. Explain read and write operations, also write a C++ program to perform the reading and writing operations in file handling method as following : F-1/128/19 PLO.ts) This is Writing Operation Enter Your Name - Ravi Kumar ‘This is Reading Operation Entered Name is - Ravi Kumar Or How to access a file through Random Access ‘method Is C++ ? Explain with suttable example, ete ttotbees F-1/125/19 are Roll No. ‘April-2021 1125/21 1 Semester Examination, M.Sc. INFORMATION TECHNOLOGY PaperI Programming, with C4) Tine: si wa computer. Question Paper comprises of 2 Note Al tins plane Coe to sections, Section fe ection Bis short ance type a con Cis tng answer iypeeith itera oie SECTION‘’ (Multiple Choice Questions) Choose he coc answer aed T which concept allows you to reuse the written code? (@) Encapsulation (0) Abstraction (9 Inheritance (2) Polymorphism 2. The default standard input device for C+ program is: (@) Mouse (©) Scanner (0 Keyboard (@) None of the above 3. Which of the following feature of OOPs is not used in the following Cr+ code? cass A inti public: PTO.Ry void print) ; Prin) fooutshella” ea) ol _ fa) leftmost (by rightmost (2) topmost Void assign (int aj i What happens if acer forgets to define a constroctr fale 8 clase? (@) Abstraction fa) Error occurs (©) Segmentation faut (©) Encapsulation 2 i: (6) Inheritance (© Objects aaa (4) Polymorphism . Out ofthe follow wing, which is nota mer (2) static funetion ec aes re not created properly (ay Compiter provides a defltcorstrocor to avoid fault! © fe nc (©) constant function a Which header file is used for reading and writing toa Sle? we eae (@) virtual function is the meaning of the following declaration ? Jndeciosteeam (b) tincludeststream> (© fineludecfile> (4) Fincludesfe> 40, Which function allow changing the location of the get and putting positions. int pia) () pisarray of pointer to pela ©) pis pointer to function (©) pis pointer to such function wh {@) sehand sp) ©) sekgQ and sekpO hich return (4) pis pointer to array of function type isthe array (© gog0 and gop0 (2) seekgQ and seek) 6 What are m # are mandatory parts inthe function declarat SECTION'B’ 6x5=30 ©) return type, (Ghort Answer Type Questions) [Note Answer thefllosing question i 250 0rd. 1. Explain basic concepts of Object Oriented Programm’ fanction name (©) return type, function name, paramé (©) parameters, function nam = (@) parameters, variables Or vazsie1 Discuss dynamic initiation of variable with, suitable example. Gans PTO.function over iy ing Wn ie hat do you my ambiguity arise 7 Bang Ambiguit uy ae? Espana? I + How pure virtual le. tie 3. How endl and example, List any five library classes that plain with example, Note: Anssver the 1 Whe Stelement infor and while loop with example, Expl Or : How p. Pass structure eample **SRUMNI no fany 4 Discuss the need of f fuanet Explain with von diferent example. om it hey ‘tan Or Write a Coe pro Printandfaetion 4 big 05 nang 500 manipulator works ? Expiin Or # handle streams in Coy SECTION’ Long Answer Type Questions) Following questions in 500 words. am cnirol structure ? Discuss use of break and cont Or hn the type conversion from basi version from basic type to elas 'VP° to basi ype with proper ceampes wt i members are different form or 1? In which situation inlien function may re ancion aye 9 PS 20 tem Explain with example. a lor ? Give its use. When it is used fo? Explain with suitable example. what sinline function uct What is copy const nplicty for what purpos or show riveteand protected access specifier and when they ate inherited as public, private and Explain public, that viiy when protected. 4. Define operator overloading, Explain how to overload unary eperator and binary operator oO Write a Cit program to create class mother having data member to store salary of mother, ceate another clas father Store salary of father. Use fiend function which accept object of father and mother and print salary of mother and father 5: Write short notes on the felling: (0) Random aces le processing, (b) Manipulator. Or Write C++ program to createa text file, check file created or not. created it will write some text into the fle and then read the text from the file. ecc0c0cc cco} Gansrat 5175ee ae og Roll No: AM-12" ; jester Examination, December 2022 seme? a M.Sc. INFORMATION TECHNOLOGY Paper I (Object Oriented Programming with C++) Time : 3 Hours ] { MAXIMUM MARKS : 100 [ P.M. : 40 Note : All questions are compulsory. Question Paper comprises of 3 Sections. Section A is objective type/multiple choice questions with no internal choice. Section B is short answer type with internal choice. Section C is long answer type with internal choice. Section ‘A’ (Objective Type Questions) Choose the correct answer : 1x10=10 1. One of the alternatives to nested if is the : (a) Break statement (b) Jump statement (c) Switch statement (d) Both (a) and (b) 2. Choose the option below which is not a member of the class : (a) Friend Function (b) Static Function (c) Virtual Function (d) Const Function P.T.O.© following ME Shots ature my eqy © Polymorpnisn (0) Messy SEE Passing (@) Bot ie *h (ay 0) teri ee ma Gy, Fate a g from ve MOTE than ones one ows ™ YoU to 6, thacinhersts properties class. (2) MAEVE inher, © Mulupte in tay ‘eritance. ©) Hybria inheritance (b) By declaring a virtual function class in the base the class declaration (d) None of the above AM-125 So correct i following statements Isc grammy 6 ee id function in C++ programming, cess private (a) A friend function 1s able to access © members of a class . he protected (o)A fiend function ean access the P' members of a class ne public {c) A friend function is able to access the Pp members of a class (@) All of the above 7. Which among the following can’t be used for polymorphism ? {@) Static member function {b) Member funetion overloading (6) Predefined operator overloading (@) Constructor overloading Which of the following syntax is incorrect for the class definition ? fa) Student class (}; (b) Class student. {student (int a) { Vk (©) Class teacher (public : teacher (int a) {}): (@) None of the Mentioned: AM-125, per: 2 8 Which of the following ts not used opening mode > i “ “a fl ios ss trune py tos: a w binary fC) Tos : sin (08 sate 10. cin is () Class, (6) Object (0) Package (a) Namespace Section “B (Short Answer Type Questions) 65.35 Note : Answer the following questions words. msg What ts Encapsulation ? Explain how is achieved in C++? or Explain the usage of break and continue with example. - What is inline function ? Also define templat What is enumeration data type explain wit example ? memory? How memory is dynamically allocat and deallocated in C++? en wat fe TS . or Write a program in C++ to write and read a text from the file Seetion °C" (Long Answer Type Questions) 12x5=60 Note : Answer the following questions in 500 words, 1. Explain various operators available in C++ with example, Or Write a program in C++ to check a number is prime or not. AM-125, PTO. AM-125(6) her spenee and return 2. Deseribe call by reference by reference with suitable example. Or What is the difference between structure and — ? How to access the member of a structure variable using pointer ? 3. What are the different types of constructor, explain with example ? Or Write a program in C++ to implement multileye] inheritance. 4. Describe friend function and friend class. Wri : a program in C++ to find largest of two numbers. Or Write a program in C++ to overload binary operator ‘+’. 5. Write short notes on the following : (i) File modes (ii) eof () (iii) get (), put () Or Explain the various file handling operatic available in C++, SGSteeceeegee | AM-125 6/50
You might also like
Object Oriented Programming Using C++ Second Year Sem II: Two Marks Questions
PDF
100% (2)
Object Oriented Programming Using C++ Second Year Sem II: Two Marks Questions
6 pages
Oops Pyq
PDF
No ratings yet
Oops Pyq
11 pages
C++ Pro QP
PDF
No ratings yet
C++ Pro QP
8 pages
Computer Science Viva-Voce Question
PDF
93% (15)
Computer Science Viva-Voce Question
8 pages
583350232vk Xii Computer Old Question & Answers 2011-12
PDF
100% (1)
583350232vk Xii Computer Old Question & Answers 2011-12
269 pages
Oops With C++ PYQ
PDF
No ratings yet
Oops With C++ PYQ
5 pages
Q Bank
PDF
No ratings yet
Q Bank
7 pages
91 Computer Science (Set-2)
PDF
100% (1)
91 Computer Science (Set-2)
16 pages
Question Bank
PDF
No ratings yet
Question Bank
16 pages
C++ Uq
PDF
No ratings yet
C++ Uq
37 pages
OOP Kalyani University.
PDF
No ratings yet
OOP Kalyani University.
32 pages
C++ Papers
PDF
No ratings yet
C++ Papers
9 pages
Oop QB Ans
PDF
No ratings yet
Oop QB Ans
23 pages
CPP October
PDF
No ratings yet
CPP October
20 pages
Oct 24 Bba (CA) CPP Solution
PDF
No ratings yet
Oct 24 Bba (CA) CPP Solution
11 pages
C - Imp
PDF
No ratings yet
C - Imp
3 pages
Solved Object Oriented Programming (2019 Pattern)
PDF
No ratings yet
Solved Object Oriented Programming (2019 Pattern)
10 pages
CSC201 Past Questions and Answers
PDF
No ratings yet
CSC201 Past Questions and Answers
17 pages
C
PDF
No ratings yet
C
8 pages
Ilovepdf Merged
PDF
No ratings yet
Ilovepdf Merged
12 pages
Inheritance 4,5 Units 1marks
PDF
No ratings yet
Inheritance 4,5 Units 1marks
7 pages
Csca 2019 (12) - Noterspoint
PDF
No ratings yet
Csca 2019 (12) - Noterspoint
12 pages
Oops 1
PDF
No ratings yet
Oops 1
20 pages
It 304 Object Oriented Programming and Methodology Jun 2020
PDF
No ratings yet
It 304 Object Oriented Programming and Methodology Jun 2020
6 pages
Oop Merged
PDF
No ratings yet
Oop Merged
12 pages
Object-Oriented Programming (OOP) in C++ Sample Paper
PDF
No ratings yet
Object-Oriented Programming (OOP) in C++ Sample Paper
9 pages
Object Oriented Programming in C++
PDF
No ratings yet
Object Oriented Programming in C++
18 pages
Cse Ass2024
PDF
No ratings yet
Cse Ass2024
4 pages
CPP Question Bank
PDF
No ratings yet
CPP Question Bank
3 pages
Be - Electronics and Telecommunication Engineering - Semester 4 - 2024 - May - Object Oriented Programming Oop Pattern 2019
PDF
No ratings yet
Be - Electronics and Telecommunication Engineering - Semester 4 - 2024 - May - Object Oriented Programming Oop Pattern 2019
2 pages
Oop - Exam Set A
PDF
No ratings yet
Oop - Exam Set A
4 pages
BCA-241:Object Oriented Programming and C++ S.Y. B.C.A. (Science)
PDF
No ratings yet
BCA-241:Object Oriented Programming and C++ S.Y. B.C.A. (Science)
4 pages
Fop-2 s-23
PDF
No ratings yet
Fop-2 s-23
3 pages
OOP Ques
PDF
No ratings yet
OOP Ques
10 pages
2016 CE104 University Paper
PDF
No ratings yet
2016 CE104 University Paper
3 pages
OOP in C++
PDF
No ratings yet
OOP in C++
25 pages
Be Electronics and Telecommunication Engineering Semester 4 2023 November Object Oriented Programming Oop Pattern 2019
PDF
No ratings yet
Be Electronics and Telecommunication Engineering Semester 4 2023 November Object Oriented Programming Oop Pattern 2019
2 pages
C MCQ Test 2 (Imamoddin Answer)
PDF
No ratings yet
C MCQ Test 2 (Imamoddin Answer)
9 pages
Set - B Encs 102 - Oop Using C++ (Btech Sem - II) (2024 - 25 Mid - Term) Krmu
PDF
No ratings yet
Set - B Encs 102 - Oop Using C++ (Btech Sem - II) (2024 - 25 Mid - Term) Krmu
2 pages
CEGP013091: 49.248.216.237 18/12/2024 09:34:23 Static-237
PDF
No ratings yet
CEGP013091: 49.248.216.237 18/12/2024 09:34:23 Static-237
2 pages
Be - Electronics and Telecommunication Engineering - Semester 4 - 2022 - May - Object Oriented Programming Oop Pattern 2019
PDF
No ratings yet
Be - Electronics and Telecommunication Engineering - Semester 4 - 2022 - May - Object Oriented Programming Oop Pattern 2019
2 pages
Oop 4
PDF
No ratings yet
Oop 4
2 pages
C++ Old Paper
PDF
No ratings yet
C++ Old Paper
10 pages
QuestionbankCPP SIT
PDF
No ratings yet
QuestionbankCPP SIT
7 pages
Be - Electronics and Telecommunication Engineering - Semester 4 - 2022 - November - Object Oriented Programming Oop Pattern 2019
PDF
No ratings yet
Be - Electronics and Telecommunication Engineering - Semester 4 - 2022 - November - Object Oriented Programming Oop Pattern 2019
2 pages
May Jun 2022
PDF
No ratings yet
May Jun 2022
2 pages
Be Computer Engineering Semester 3 2022 May Object Oriented Programming Oop Pattern 2019
PDF
No ratings yet
Be Computer Engineering Semester 3 2022 May Object Oriented Programming Oop Pattern 2019
2 pages
C 2
PDF
No ratings yet
C 2
3 pages
C PDF
PDF
No ratings yet
C PDF
20 pages
C++ QP
PDF
No ratings yet
C++ QP
7 pages
Questionbank CPP
PDF
No ratings yet
Questionbank CPP
7 pages
Question Paper 2021 Introduction To Object Oriented Programming
PDF
No ratings yet
Question Paper 2021 Introduction To Object Oriented Programming
4 pages
VTU-14-01-2019 01:41:02pm: TG - TG - TG - TG - TG - TG - TG - TG - TG
PDF
No ratings yet
VTU-14-01-2019 01:41:02pm: TG - TG - TG - TG - TG - TG - TG - TG - TG
2 pages
91 Computer Science
PDF
No ratings yet
91 Computer Science
16 pages
Sample Question Paper: Employee Employee Name, Employee ID Getdata, Putdata
PDF
No ratings yet
Sample Question Paper: Employee Employee Name, Employee ID Getdata, Putdata
7 pages