Sunteți pe pagina 1din 4

DSE-1

C++
Short questions.
1. Multiple choice questions (1×10)

(a) Default return type of functions in CCP is

(i) Void

(ii) Long

(iii) Char

(iv) Int

(b) If a program uses inline function then the function is expanded


inline at

(i) Compile time

(ii) Run time

(iii) Both a & b

(iv) None of these

(C) Assigning one or more function body to the same named is called

(i) Function overloading

(ii) Function overriding

(iii)Both a & b

(iv) None

(d) A class can contain objects of other classes and this phenomenon
is called

(i) Relationship

(ii) Object association


(iii) Containership

(iv) None of these

(e) Scope resolution operator is used

(i) To resolve the scope of global variables only

(ii) To resolve the scope of function of the classes only

(iii) To resolve scope of global variables as well as functions of the


classes

(iv) None of these

(f) By default, members of the classes are

(i) Protected

(ii) Private

(iii) Public

(iv) Static

(g) The act of representing only essential features without including


the background details.

(i) Data hiding

(ii) Data encapsulation

(iii) Data Abstraction

(iv) All of these

(h) Generic pointers can be declared with

(i) Auto

(ii) Void

(iii) Asm

(iv) None of these


(I) What is the use of dynamic-cast operator?

(i) It converts virtual base class to derived class

(ii) It converts virtual base object to derived objects

(iii) It will convert the operator based on precedence

(iv) None of these

(j) Which is used to keep the call by reference value as intact?

(i) Static

(ii) Const

(iii) Absolute

(iv) None of these

(2) Short type questions (Any seven) (2x7 = 14)

(a)What is preprocessor directive?

(b)What is the difference between call by value and call by reference in a


user defined function in c++ ?

(c) What are the basic concepts of OOP?

(d) What the major differences are between object oriented


programming (OOP) and procedural oriented programming
(POP)?

(e)What is the effect of absence of break in switch case in c++ ?

(f)Why main ( ) function is special in c++ ?

(g)What is the difference between while and do….while loop in c++ ?

(h)What is the purpose of delete operator?

(i) Explain about this pointer

(j) What are valid operations on pointers?


(3) Long type questions (Any six) (6x6 = 36)
(a)WAP to chock whether a number is a palindrome number or not

(b)WAP to find out the sum of array elements using pointer

(c)What is the difference between break and continue statement?


Explain with example

(d) WAP to multiply two matrices

(e) WAP to sort an array of integers.

(f) WAP to show the use of reference variable

(g) Explain different memory management operators in c++

(h) What is a preprocessor? Explain the different types of preprocessor


directives.

S-ar putea să vă placă și