B.TECH - Semester 4 computer programming Question Paper 2019 (jun)
Practice authentic previous year university questions for better exam preparation.
Sample Questions
- What is the return type of main ()?
- Define constant pointer and pointer to a constant.
- List out the memory differencing operator.
- Define integral widening conversion.
- Where can we define member function?
- What are the ways in which a constructor can be called?
- What is the difference between a text file and binary file?
- Show the maximum number of nodes in an binary tree of height H is $2^{\mathrm{H}+1}-1$.
- A full node is a node with two children .Prove that the number of full nodes plus one is equal to number of leaves in a non empty binary tree.
- What do you mean by cursor implementation of a list. ( $\mathbf{1 0} \boldsymbol{\times} \mathbf{2} \boldsymbol{=} \mathbf{2 0}$ Marks) P.T.O. Answer any one full question from each module. Each question carries $\mathbf{2 0}$ marks.
- (a) Calculate factorial of a number using recursive functions in $\mathrm{C}++$.
- (b) Write a $\mathrm{C}^{++}$program to generate Fibonacci sequence using while loop.
- (c) Explain the basic concepts of oops programming.
- (a) Convert a lower case string to upper case string using c++ program.
- (b) Explain multi dimensional arrays with examples.
- (c) Explain the operators used in $\mathrm{c}^{++}$programming.
- (a) Define an examiner class. Provide all necessary data and function members to provide the following: The examiner must access answer sheets of at least one subject; He may examine answer sheets of multiple subjects; The examiner represents a colle...
- (b) What is a virtual destructor? Explain the use of it.
- (a) Define a supplier class. Assume that the items supplied by any given supplier are different and varying in number. Use dynamic memory allocation in the constructor function to achieve the solution.
- (b) Explain about static member and this operator with suitable code.
- (a) For a supermarket, define a bill class. All the bill objects will contain bill number, name of clerk preparing the bill, each item with quantity and price and total amount to be paid. Total items in the bill are varying. Define dynamic memory all...
- (b) Write a program for generic queue class with two member functions, insert and delete. Use the array to implement the queue.
- (a) Explain the role of seekg(), seekp(), tellg(), tellp(), function in the process of random access in a binary file.
- (b) Define a student class. Inherit that into MCA Student class and Non MCA Student. MCA Students inherits into GLS Students and Non GLS Students. A function Show Practical Hours can only be applied to MCA Students. We have a base class Student point...
- (a) Explain how the given expression is converted into postfix expression using stack. $\left(A+\left(\left(B^{*} D+E / F\right)^{\wedge} G-H\right) / C+E^{*} F\right) \sim B^{*} E$.
- (b) sort the given integers and show the intermediate results using insertion sort $35,12,14,9,13,45,34,95,40,6$. Write C++ code to sort an integer array using insertion sort.
- (a) Explain the array and linked list implementation of a queue.
- (b) Sort the given integers and show the intermediate results using selection sort $35,12,14,9,15,45,32,95,40,5$ Write C++ code to sort an integer array using selection sort. (10) G - 3619