SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR 603203 DEPARTMENT OF COMPUTER SCIENCE & APPLICATIONS QUESTION BANK (2017-2018) Course / Branch : M.Sc CST Semester / Year : EVEN / II Subject Name : Programming in C++ Subject Code : CTC4D Faculty Name : Dr. Priya K Designation : Asst.Professor Unit I 1.1 Define Object Oriented Programming. Apr 13, 15 1.2 Name any OOP language. Apr 13 1.3 What is OOPs? Apr 17 1.4 List out the features of Object oriented programming. Apr 13,15 1.5 Specify three language features that characterize object oriented Nov 15 languages. 1.6 Difference between dynamic and static binding. Apr 15 1.7 Difference between object oriented and procedural programming 1.8 Why C++ is called as object oriented programming? 1.9 Explain the evaluation of programming language. Apr 14,15, Nov 12,13 1.10 List some benefits of OOP s and its paradigm. Apr 12,13,14,17,Nov 15,17 1.11 List few applications of OOP s Apr 13,15,16,Nov 13,17 1.12 What is OOPs? How is different from the procedure oriented Apr 12 programming? 1.13 Distinguish between procedure oriented programming and OOPs Apr 13, Nov 14 1.14 List few areas of application of OOP technology. Apr 12 1.15 What are the advantages of an object oriented programming? Nov 12 1.16 How are data and functions organized in an object oriented program? Nov 12 1.17 Explain the characteristics of OOP language. Nov 14 PART - C (Minimum 7 Questions) 1.18 Briefly discuss the software evolution during the period 1950-1990 Apr 12 1.19 Explain the basic concepts of OOPs in detail. Apr 12,13,14,15,17, Nov 12,13,14 1
1.20 Explain about software evolution. Apr 13,Nov 14,15,17 1.21 Write about the principles of object oriented programming. Apr 2016 1.22 List and explain any five areas of applications of OOPs technology. Nov 12 Unit II 2.1 Write the syntax for variable declaration with an example. Nov 11,Nov 15 2.2 What is inline function? Write with its syntax. Nov 11,12, Apr 13, 14,17 2.3 Give an example for friend class. Nov 11,14 2.4 Define identifier. Apr 13, Nov 12 2.5 Define reference variable. Apr 13,Nov 12 2.6 What is function? Nov 12 2.7 What do you mean by namespace scope? Nov 12 2.8 Mention any four keywords in C++. Nov 14, Apr13,14,15,17 2.9 What are manipulators? Apr 17 2.10 What is custom/user-defined manipulator? Nov 17 2.11 Write the use of break statement. Nov 14 2.12 What do you understand from inline function? Nov 15 2.13 Define variable. Apr 12,16 2.14 State the use of *,& in pointers. Apr 16 2.15 Define operator precedence. Apr 12 2.16 What is an expression? Apr 12 2.17 Define local scope. Apr 12 2.18 What do you mean by sizeof() operator? Apr 12 2.19 What is compound expression? Apr 12 2.20 What is meant by array? Apr 15 2.21 Differentiate between binary and unary operator in C++ Nov 15 2.22 What is the use of the operator :: in C++? Apr 12, Nov 15 2.23 Define the various parameter passing mechanisms supported by C++ Apr 12 2.24 What is a break statement? Apr 14 2.25 What does increment and decrement operator do in C++? Apr 16 2.26 Which operator is used for dynamic memory allocation? Nov 13 2
2.27 Why reference is not same as a pointer? Nov 17 2.28 What are features required for object-based programming language? Nov 17 2.29 Describe the general form and advantage of using inline functions in C++ Apr 15,16 2.30 Discuss about pointers to functions in detail. Apr 15 2.31 Explain about virtual functions in detail Apr 15,17 2.32 With an example explain friend function in C++ Apr 15, Nov 15, 17 2.33 Write a C++ program to find the largest of the given 3 numbers. Apr 13, Nov 11 2.34 Explain function prototyping. Nov 12,13 2.35 Explain the role of operators and manipulators. Nov 12 2.36 List atleast four new operators added by C++ which aid OOP. Give example. Apr 12 2.37 Describe the various data types available in C++. Apr 13, Nov 12,13,15 2.38 Write a C++ program to read a number and print the square of the number. Nov 15 2.39 Write a C++ program to find the roots of quadratic equation. Apr 15 2.40 What do you understand from enumerated data type? Give example. Apr 12,14 2.41 Write a C++ program to check the given year is leap or not. Apr 14 2.42 Write a program in C++ to evaluate the equation V=p(1+r) n. Nov 12 2.43 How does an inline function differ from a pre-processor macro? Nov 12 PART - C (Minimum 7 Questions) 2.44 Write a program to explain the working of friend function in C++ Apr 17 2.45 Discuss various control structures available in C++ with an example Apr 14,15,17, Nov 12,13,14 2.46 Illustrate the various types of conversion with an example. Nov 11, Apr 15 2.47 Write a C++ program for ascending order using inline function Nov 12,14 2.48 What is a pointer? Explain about the pointers in C++. Apr 15 2.49 Describe the different styles of writing prototypes. Apr 12 2.50 Explain the various types of operators in C++. Apr 13, 16 2.51 Explain the various parameter passing mechanism in C++. Apr 13, Nov 17 2.52 Explain parameters passing in functions and values return by function Nov 12 2.53 Write program in C++ using arrays to compute matrix multiplication Apr 16 2.54 Write a C++ program to calculate the variance and standard deviation of N numbers. Nov 12 3
2.55 With neat diagram explain the various control statements available in C++. Nov 15 2.56 Write a C++ program for matrix multiplication using friend function. Nov 17 Unit III 3.1 What is an object? Nov 11,12,14 3.2 What is member function? Nov 12 3.3 Classify the parts of class definition. Nov 15 3.4 How does objects are created? Apr 15 3.5 Define the term class. Apr 13, Nov 11, 15 3.6 Define base class. Apr 13 3.7 Which data members declared under protected label section inside a Nov 2015 class? 3.8 What are the operators cannot be overloaded? Apr 13, Nov 11,13,15 3.9 Define function overloading. Apr 15,16, Nov 12 3.10 What are the two types of overloading? Apr 17 3.11 What is meant by operator overloading? Apr 12, Nov 14 3.12 List out the restrictions lies in using constructors. Nov 15 3.13 When will you say a constructor as a default constructor? Nov 17 3.14 What type of error may occur for passing an argument to destructor? Nov 17 3.15 What are the operators cannot be overloaded using friend function? Nov 17 3.16 How is the state member function called? Apr 13 3.17 Briefly discuss about scope resolution operator. Apr 15 3.18 What is constructor overloading? Give an example Nov 15 3.19 Explain with example of constructor and destructor? Apr 12,15, Nov 11,12,14,15,17 3.20 State the concepts of function overloading with example. Apr 12,13,14, Nov 13,15 3.21 What are the rules of operators overloading? Apr 12,15,16 Nov 12 3.22 Explain about type conversions with an example. Apr 13,14,15, Nov 12 3.23 What is a class? How does it accomplish data hiding? Apr 12 3.24 How does a C++ structure differ from a C++ class? Nov 12 3.25 Write notes on class and objects. How are they associated to each other? Apr 17 4
PART - C (Minimum 7 Questions) 3.26 Discuss operator overloading with program to show how + may be overloaded to perform string addition. Apr 17 3.27 Write a program in C++ to create the operations of a basic calculator. Apr 17 3.28 Write a C++ program using operator overloading. Apr 13,Nov 11,12 3.29 Write a program in C++ using function overloading. Nov 12,14 3.30 Write a program to multiply two matrices use passing object to a function concept. Apr 12 3.31 Describe the different types of constructor with suitable examples. Apr 12,13, Nov 13 Write a C++ program for string concatenation using operator overloading Nov 17 Unit IV 4.1 Define inheritance with syntax Apr 12,14, Nov 17 4.2 What is this pointer? Apr 12 4.3 Define polymorphism. Apr 13,15,17, Nov 14 4.4 What is stream? Apr 12, Nov 14,15 4.5 What does iostream mean? Apr 16,17 4.6 What is output stream? Nov 12 4.7 What is input operator? Apr 12 4.8 What is output operator? Nov 12 4.9 What is Boolean manipulator? Nov 12 4.10 What is meant by show base manipulators? Apr 12 4.11 Write the use of the following manipulators: endl and ends. Nov 15 4.12 What is pure virtual function? Apr 12 4.13 Write the syntax of the single inheritance in C++. Apr 13 4.14 When will you say a virtual function is pure virtual function? Nov 13 4.15 Give the syntax for inputting value for an integer from the user. Apr 17 4.16 What does the given code mean int i; (float) i? Apr 17 4.17 Define type casting. Apr 17 4.18 What are the stream classed for console operations? Nov 17 4.19 Write notes on derived class. Apr 15,Nov 17 4.20 Write note on deriving a class and extending inheritance. Nov 12 5
4.21 Illustrate the effect of inheritance on the visibility of members. Apr 14, Nov 15 4.22 Explain on Data abstraction and classes. Apr 12 4.23 Write a note on mapping console I/P operations. Apr 12 4.24 Explain the need for virtual functions in C++ Apr 13 4.25 Explain the various access specifiers in C++. Apr 13 4.26 Describe the standard stream classes for console I/O operations. Apr 13,15, Nov 15 4.27 Write the various forms of get() function supported by the input Nov 12 stream 4.28 Write a note on Deriving a class and extending inheritance Nov 12 PART - C (Minimum 7 Questions) 4.29 Explain the polymorphism and constructors in inheritance Apr 12 Explain the concept of data encapsulation and accessing of member 4.30 elements. Nov 15 4.31 Explain the types of inheritance with examples Apr 12,13,15,17, Nov 12,13,17 4.32 Explain about features of IOSTREAM classes in I/O formatting. Apr 15 Write suitable example discuss the unformatted and formatted I/O Apr 12,13, Nov 4.33 operations. 11,12,14,15 4.34 Explain briefly the stream classes for console IO operations. Nov 12 4.35 Explain flags and manipulators associated with cout in C++. Nov 15 4.36 Explain polymorphism and managing console IO operations. Nov 12 Write a program in C++ for a simple student information system 4.37 using inheritance and virtual functions. Apr 12 4.38 How is polymorphism achieved at (i) compile time (ii) Runtime Apr 12 4.39 What are the different types of polymorphism? Nov 17 4.40 Describe how an object a class that contains objects of their created. Nov 12 Unit V 5.1 Define stream in C++ Apr 13, Nov 11, 14 5.2 State the purpose of filehuf Apr 13, Nov 11 5.3 What do you mean by output operator? Nov 12 5.4 What are command line arguments? Nov 14 5.5 What is file? Apr 13,17, Nov 12 5.6 What is file mode? Nov 12,15, Apr 15 6
5.7 Write the use of seekp() function. Nov 15 5.8 Differentiate between ifstream and ofstream Apr 15 5.9 What are the stream classed for file operations? 5.10 What are file streams used for? Apr 16 5.11 How to initialize a file stream object? 5.12 How to detect an end of file? 5.13 What is exception handling in C++? Apr 15,Nov 13,15,17 5.14 What are the functions will be provided by the file stream classes? Nov 17 5.15 List out the various file mode parameters and its meaning. Apr13, Nov 11,15 5.16 What is error handling? Explain with an example. Apr 12,13,Nov 11,14 5.17 Explain about streams and buffers. Nov 12 5.18 Briefly describe the file operations in C++ Nov 12,13, Apr 17 5.19 What are the classed are used for file operations? Nov 17 5.20 Describe the different types of access in files. Nov 17 5.21 Describe the standard stream classes for console operation. Nov 15 5.22 Illustrate command line arguments with example. Apr 12,14,15,17 5.23 Explain the concept of using command line operators in C++ Apr 16 5.24 Write about the importance of file streams in C++ Apr 17 5.25 What are the steps involved in using a file in a C++ program? Apr 12 5.26 Explain the random access functions in C++. Apr 13 5.27 Write short notes on file input and output. Nov 14 5.28 Explain how read and write operations are performed in files Apr 13 5.29 Write a program to accept values of an employee and print the name and designation of an employee. 5.30 Write a C++ program to read a file and display the number of lines present in the file. Apr 16 Apr 15, Nov 12 PART - C (Minimum 7 Questions) 5.31 Describe the various classes for file stream operations in detail Apr 13,15 5.32 Write a C++ program to display the total number of words present in the content. Nov 11 5.33 Write a C++ program to read a file content and display the total number of vowels present in the content. Apr 13, Nov 14 5.34 What is a file mode? Describe the various file mode options available Apr 12,14 5.35 Create a file which consists item and its price. Write a C++ program to read number quantity for each item through keyboard and generate the bill for the same Apr 14, Nov 12 7
5.36 Explain the various manipulations done to a file in C++. Apr 16 5.37 How do you use file pointer for the file process? Nov 13 5.38 Can you handle runtime error? Explain the concept of exception handling 5.39 Write a C++ program to perform deposit and withdraw operation for a banking system using file 5.40 Write a C++ program to read content in the file and write in another file Nov 13 Nov 15 Nov 17 8