Marathwada Institute of Technology

Similar documents
PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

I PUC - Computer Science. Practical s Syllabus. Contents

Multichoice Quetions 1. Atributes a. are listed in the second part of the class box b. its time is preceded by a colon. c. its default value is

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

BCS2B02: OOP Concepts and Data Structures Using C++

Object Oriented Programming With C++(10CS36) Question Bank. UNIT 1: Introduction to C++

Laboratory Assignments of OBJECT ORIENTED METHODOLOGY & PROGRAMMING (USING C++) [IT 553]

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

C++ INTERVIEW QUESTIONS

Curriculum Map. Discipline: Computer Science Course: C++

El Dorado Union High School District Educational Services

PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON

Subject Name: Object Oriented Programming in C++ Subject Code:

Syllabus for Computer Science. Proposed scheme for B.Sc Programme under Choice Based Credit System

Objected oriented Programming: C++ Unit 1 1. Introduction 1.1. Introduction to Object Oriented Programming C++ fundamentals.

PES Institute of Technology-BSC QUESTION BANK

13 Classes & Objects with Constructors/Destructors

C++ Programming Language

B.Sc.(Computer Science) and. B.Sc.(IT) Effective From July 2011

The C Programming Language course syllabus associate level

10CS35: Data Structures Using C

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

AP Computer Science Java Mr. Clausen Program 9A, 9B

Pseudo code Tutorial and Exercises Teacher s Version

Get post program 7 W.a.p. that Enter two numbers from user and do arithmetic operation

5: Magnitude 6: Convert to Polar 7: Convert to Rectangular

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Chapter One Introduction to Programming

WORKSPACE WEB DEVELOPMENT & OUTSOURCING TRAINING CENTER

Java (12 Weeks) Introduction to Java Programming Language

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. CISY 105 Foundations of Computer Science

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

COWLEY COLLEGE & Area Vocational Technical School

Java Application Developer Certificate Program Competencies

Programming and Software Development (PSD)

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

Glossary of Object Oriented Terms

Object Oriented Software Design

Certified PHP Developer VS-1054

Simple C++ Programs. Engineering Problem Solving with C++, Etter/Ingber. Dev-C++ Dev-C++ Windows Friendly Exit. The C++ Programming Language

Programming in C# with Microsoft Visual Studio 2010

Sources: On the Web: Slides will be available on:

An Introduction to Programming and Computer Science

Java SE 8 Programming

C++FA 5.1 PRACTICE MID-TERM EXAM

Object Oriented Software Design

Chapter 2: Elements of Java

To Evaluate an Algebraic Expression

ADVANCED SCHOOL OF SYSTEMS AND DATA STUDIES (ASSDAS) PROGRAM: CTech in Computer Science

VB.NET Programming Fundamentals

An Incomplete C++ Primer. University of Wyoming MA 5310

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

In this Chapter you ll learn:

Computing Concepts with Java Essentials

Introduction to Matlab

JAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

Java Interview Questions and Answers

NEW MEXICO Grade 6 MATHEMATICS STANDARDS

Sample Problems. Practice Problems

Basic Use of the TI-84 Plus

1) Explain the following evolutionary process models: a) The spiral model. b) The concurrent development model.

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

TECHNOLOGY Computer Programming II Grade: 9-12 Standard 2: Technology and Society Interaction

1. Define: (a) Variable, (b) Constant, (c) Type, (d) Enumerated Type, (e) Identifier.

COMPUTER SCIENCE 1999 (Delhi Board)

CEC225 COURSE COMPACT

C++ Language Tutorial

Lecture 2 Notes: Flow of Control

Moving from CS 61A Scheme to CS 61B Java

Florida Math Correlation of the ALEKS course Florida Math 0018 to the Florida Mathematics Competencies - Lower

Charlesworth School Year Group Maths Targets

ModuMath Basic Math Basic Math Naming Whole Numbers Basic Math The Number Line Basic Math Addition of Whole Numbers, Part I

Everyday Mathematics CCSS EDITION CCSS EDITION. Content Strand: Number and Numeration

MATHCOUNTS TOOLBOX Facts, Formulas and Tricks

Everyday Mathematics GOALS

QUIZ-II QUIZ-II. Chapter 5: Control Structures II (Repetition) Objectives. Objectives (cont d.) 20/11/2015. EEE 117 Computer Programming Fall

Specialized Programme on Web Application Development using Open Source Tools

Object Oriented Software Design II

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Math 0980 Chapter Objectives. Chapter 1: Introduction to Algebra: The Integers.

AP Computer Science Java Subset

PROGRAMMING IN C PROGRAMMING IN C CONTENT AT A GLANCE

ALGEBRA. sequence, term, nth term, consecutive, rule, relationship, generate, predict, continue increase, decrease finite, infinite

Unit Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]

Syllabus OBJECT ORIENTED PROGRAMMING C++

How do you compare numbers? On a number line, larger numbers are to the right and smaller numbers are to the left.

DE 6211 DISTANCE EDUCATION. M.Sc. (IT) DEGREE EXAMINATION, MAY PRINCIPLES OF INFORMATION TECHNOLOGY. (2002 onwards) PART A (10 3 = 30 marks)

Basic Programming and PC Skills: Basic Programming and PC Skills:

PROBLEMS (Cap. 4 - Istruzioni macchina)

ML for the Working Programmer

Bangalore University B.Sc Computer Science Syllabus ( Semester System)

Chapter 4 OOPS WITH C++ Sahaj Computer Solutions

Ready, Set, Go! Math Games for Serious Minds

AFF 808. Sub. Code 4BIT1C1. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Information Technology

Introduction to Programming System Design. CSCI 455x (4 Units)

Introduction to Java

Transcription:

Marathwada Institute of Technology Master of Computer Application Title of the subject: Object Oriented Programming using C++ Course Code: MCA 101 Faculty: Shubhashree Savant Class: FY MCA Part - I (Question Bank for Theory questions) 1 What do you mean by Object Oriented Programming? Differentiate between Procedure Oriented - language and Object Oriented Language? 2 Elaborate the characteristics of Object Oriented Programming? 3 Define constant and variable? Explain how constants are defined in C++? 4 Explain enumerated data types and derived data types with example. 5 Explain the different forms of if with suitable example. 6 What is loop? Explain a. For loop b. Difference between entry controlled loop and exit controlled loop 7 What is array? Explain one-dimensional array? 8 Define array? Explain two-dimensional array with example? 9 What is function? Explain a. Function Definition b. Function Calling c. Function Declaration 10 Define function? Explain different parameter passing techniques. 11 What are dynamic allocation operators in C++? Explain it with an example? 12 Explain the concept of structure with suitable example? 13 Write short note on: a. Keywords and Identifiers b. Conditional Operator c. cin and cout d. preprocessor directives e. Data types used in C++ f. Enumerated data type g. Difference between while and do-while h. Difference between array and structure i. Manipulators Unit-I Page 1

(Question Bank for Programs) 1 Program to accept two numbers from keyboard. Calculate and print addition, subtraction, multiplication, division and modulo. 2 Write a C program to find sum and average of 3 real numbers. 3 Program to calculate and print area and circumference of circle. 4 Program to calculate and print area and perimeter of rectangle. 5 Program to convert temperature from degree Fahrenheit to degree Celsius and vice-versa. 6 Program to accept a three digit number from keyboard. Calculate and print sum of individual digits. 7 Program to accept a 4 digit number and print the reverse of a number. (i.e. 1234 4321) 8 Rajiv s basic salary is input through the keyboard. His dearness allowance (DA) is 40% of basic salary, and House Rent Allowance (HRA) is 20% of basic salary. Write a program to calculate his gross salary. 9 Program to accept and display your complete name (i.e. first name, middle name and surname), age and city. 10 Program to swap the values of two variables using third variable. 11 Program to swap the values of two variables without using third variable. 12 Program to swap the values of two variables using bitwise operator. 13 Program to find smallest of two numbers using conditional operator 14 Program to find the largest of three numbers using conditional operator 15 Program to find largest number of three numbers using simple if 16 Program to check whether a year is leap or not and displays the result. A year is leap year if it is evenly divisible by 4 and not by 100 or if it is evenly divisible by 400. 17 Basic salary and name of employee is entered through the keyboard. If basic salary is less than 1500 then HRA is 20% of basic and DA is 40% of basic otherwise HRA is Rs. 500 and DA is 45% of basic. Calculate gross salary. 18 Program to check whether entered number is even or odd 19 Program to check whether entered number is positive or negative 20 Program to check whether entered 4 digit number is Palindrome or not 21 Program to check whether entered three digit number is Armstrong or not 22 Program to find smallest of three numbers using nested if-else statement. 23 Program to accept students roll number, name, three subject marks of maximum 100 and display total, percentage and division. 24 Program to accept any alphabet and check whether it is vowel or not. (Using switch) 25 Program to input any integer from 1 to 7 denoting the day of the week. Convert the integer into its equivalent day and print. (For ex. if the input value is 1 the output should be Monday). Unit-I Page 2

26 An electric power distribution company charges its domestic customers as follows: Consumption unit Rate of Charges Up to 30 units Rs. 1.25 per unit 31 to 300 units Rs. 2.90 per unit 301 and above Rs. 4.00 per unit Write a program to read customer number and number of units consumed. Compute charges. 27 Program to add, subtract, multiply and divide two integers depending upon arithmetic operator. (using switch statement) 28 Program to display integers 0 through 9 (while) 29 Program to display first 10 numbers in descending order. (while) 30 Program to even numbers in the range 11 to 20 (while) 31 Program to compute and display sum of first 10 numbers (while) 32 Program to reverse the digits of an integer that has to be entered through terminal (while) 33 Program to check palindrome number (while) 34 Program to print arithmetic table of a number entered through keyboard. (while) 35 Program to check whether a number is Armstrong or not. Armstrong numbers are those whose sum of the cubes of the digits is equal to that number itself. (For ex. 153 = 13 + 53 + 33 = 1 + 125 + 27 = 153 ) 36 Program to display odd numbers in the range 1 20 (do-while) 37 Program to calculate and print sum of first 10 even numbers (do-while) 38 Program to convert binary number to decimal number. (1010 10) (do-while) 39 Program to display arithmetic table in proper format (for Ex. 2 x 1 = 2) (do-while) 40 Program to calculate and print x raised to the power n (i.e. x n ) (for) 41 Program to print even numbers in the range 51 100 (for) 42 Program to print alphabets A Z in ascending order (for) 43 Program to print alphabets a z in descending order (for) 44 Program to generate Fibonacci series up to n terms. (for) 45 Program to calculate and print factorial of a number (for) 46 Program to display integers 0 to 9 as well as 9 to 0 simultaneously one by one. (for) 47 Program to print first 5 arithmetic tables using nested loops (for) 48 Program to check whether entered number is prime or not. 49 Program to display prime numbers in the range 1 20. 50 Program to count positive and negative numbers in the range -5 to 5 using goto statement Unit-I Page 3

51 Program to generate and print following series: * 1 1 1 * * 2 2 1 2 2 3 * * * 3 3 3 1 2 3 4 5 6 * * * * 4 4 4 4 1 2 3 4 7 8 9 10 * * * * * 1 2 3 4 5 52 Program to print even numbers in the range 1 20 using continue statement 53 Program to calculate and print sum of first 10 numbers except 4. 54 Program to accept 5 array elements and print the same. 55 Program to calculate and print sum and average of N array elements 56 Program to initialize the array of 10 elements. Find and display largest and smallest among them. 57 Program to sort array of 5 elements in ascending order using EXCHANGE sort technique. 58 Program to sort array of N elements in descending order using BUBBLE sort technique. 59 Program to initialize list of 10 numbers and search whether user s no. is available in the list or not using linear search technique. If number found display search successful and location of a number. 60 Program to accept and display 2x3 Matrix. 61 Program to accept and add two matrices of dimension 3x2 and print the resultant. 62 Program to accept and subtract two 3x4 matrices and print the resultant. 63 Program to multiply 2x2 matrices and print the result. 64 Program to transpose the 3x3 matrix. Print the matrix before and after transpose. 65 Program to initialize 3x3 matrix and print the following: a. Square Matrix b. Upper Triangle c. Lower Triangle d. Diagonal 66 Program to accept 5 names and sort them in alphabetical order. 67 Program to calculate and print factorial of a number using UDF. 68 Program to define function swap to exchange the values of two variables 69 Program to calculate and print x n using UDF 70 Define a structure type stud that contains student s no., name and phone no. Using this structure write a program to read this information for one student from the keyboard and print the same. 71 Define a structure book that contains book name, price and pages. Write a program to read the information for 5 books and display in proper format. 72 Define a structure result which contains, roll number, marks of 3 subjects, total and percentage. Calculate total and percentage for N students and display roll number, total and percentage for all. Unit-I Page 4

(Question Bank for Theory questions) 1. Explain the concept of class and object with suitable example 2 Explain static class members with example. 3 Explain copy constructor with suitable example? 4 What are Constructor and Destructor? Explain types of Constructor with example. 5 What is a friend function? What are the merits and demerits of using the friend function? 6 Describe inline function in C++ with example. 7 Illustrate the concept of function overloading with example. 8 Explain different parameter passing techniques. 9 Write short note on: a. Access specifiers b. Scope resolution operator c. Array of objects d. Passing and Returning objects e. Static class members f. inline function g. friend function h. constructor overloading i. Default Function Arguments j. Dynamic memory allocation (new and delete operators) k. Function overloading and ambiguity Unit-II Page 1

(Question Bank for Programs) 1 Define a class to represent a bank account which contains Data members Member functions 1. Account number 1. To assign initial values 2. Name of the depositor 2. To accept values 3. Balance 3. To display assigned and accepted values Also write a main() function to exercise this. 2 Program to read student s particulars, such as roll number, name and phone number for 10 students, from the keyboard and display the contents on the screen. (Make use of an array of class objects). 3 Program to read and display information like empid, ename, address, contact_no of 5 employees using array of class objects. 4 Program that creates a class called Time, has two integer members for hours and minutes. One member function to accept time, one member function to display time and one function to add two objects of type Time passed as argument. Finally display the values of all objects 5 Program that adds two distances given in feet and inches 6 Write a function called zerosmaller() that is passed two int values by reference and then sets the smaller of the two numbers to 0. Write a main() program to exercise this function. 7 Program that uses a constructor which contains a counter that is incremented every time an object is created. At the end display the result shown in the counter. Also make use of destructor function. 8 program to demonstrate default function arguments output: ********** ========== ++++++++++++++++++++++++++++++ 9 Program to find mean value of two numbers using friend function 10 Program to swap values of two classes using friend function (Pass by reference) 11 Program to calculate the area of circle, rectangle and triangle using function overloading. 12 Program for multiplication of two numbers using multiply() function. Provide overloaded version: (int,int) (int, float) (float, float) 13 Program to calculate cube of a number using inline function Unit-II Page 2

(Question Bank for Theory questions) 1 Define operator overloading? Explain how to overload unary operator and binary operator. 2 What do you mean by overloading? Explain binary operator overloading with example. 3 What is operator overloading? Write rules for overloading operators 4 What is an operator function? Describe the syntax of an operator function. Enlist the operators that cannot be overloaded 5 Explain the following type conversions with suitable example i) Basic to class type ii) Class to basic type iii) One class to another class type 6 What is inheritance? Discuss the types of inheritance 7 What is multiple inheritance? Explain its use in a C++ program with an example. 8 What is virtual base class? Explain with example. 9 Explain the concept of containership with example 10 Explain hybrid inheritance giving proper example 11 Explain how ambiguity occurs in hybrid inheritance and how to resolve it? 12 What is polymorphism? Explain virtual function with its rule 13 Write short note on: a. Pitfalls of operator overloading b. Virtual base class c. Containership d. Public and private inheritance e. this pointer f. pointer to derived class g. abstract class h. virtual destructor Unit-III Page 1

(Question Bank for Programs) 1 Program to overload unary ++ and unary -- (using member or non-member function) 2 Program to overload binary + with member function and binary with non-member function 3 Program to overload unary operator 4 Program to overload relational operator > (greater than) 5 Program to overload comparison operator using friend function 6 Program to add two complex numbers using operator overloading 7 Program to implement multilevel inheritance for following scenario Student --> Exam --> Result Date Member rno m1,m2,m3 total name Member Function getinfo() getm() get_tot() putinfo() putm() show_result() 8 Program to demonstrate the hierarchy of execution of default constructor and destructor in multilevel inheritance 9 Program to demonstrate the hierarchy of execution of parameterized constructor in single level inheritance 10 Program to demonstrate the concept of pointer to object 11 program to calculate the area of circle, rectangle and square using pure virtual function Unit-III Page 2

(Question Bank for Theory questions) 1 Explain the following function with syntax, purpose and example: a. open() b. close() c. read() d. write() 2 What is a file mode? Describe the various file mode options available 3 What is file stream? Explain with example different ways of opening a file. 4 List and explain in brief various functions required for random access file operations. 5 Explain the following function with syntax, purpose and example: a. get() b. put() c. tellg() d. seekg() 6 Explain stream class hierarchy in detail. 7 What is the need of exception handling? Write a program to demonstrate the use of try, catch and throw 8 What is exception handling? Write a program to demonstrate multiple exceptions 9 Explain function template with suitable example. 10 Explain with example how can a class template be created. 11 Discuss the STL programming model? 12 Write short note on: a. Stream class hierarchy b. Command line arguments c. Exception Handling d. STL Unit-IV Page 1

(Question Bank for Programs) 1 Program to read text file info.txt and display the number of lines and characters occurred in file. 2 Program to copy the contents of one file to another. Accept source and target filename from user 3 Program to display the contents of the file using command line arguments 4 Program that creates a binary file to store the following information for group of 20 employees 1. Employee Code 2. Name of employee 3. Salary of employee 5 Program that creates a binary file to store the following information for group of 10 students 1. Roll Number 2. Name of student 3. Phone number 6 Create a file STUD.DAT in C++. Write a program to seek a particular student in a file. Create a member function display to show the record. 7 Program to calculate sum of two numbers using function template 8 Program to find maximum of two numbers using class template Unit-IV Page 2