FPL Multiple Choice Questions

 FPL Multiple Choice Questions

1. _________ is not the component of data structure.
a) Operations
b) Storage Structures
c) Algorithms
d) None of above
Answer: None of above
2.  Which of the following is not the part of ADT description?
a) Data
b) Operations
c) Both of the above
d) None of the above
Answer: None of above
3._________ Is a pile in which items are added at one end and removed from the other.
a) Stack
b) Queue
c) List
d) None of the above
Answer: Queue
4.  Which of the following data structure can't store the non-homogeneous data elements?
a) Arrays
b) Records
c) Pointers
d) Stacks
Answer: Arrays
5.  Which of the following is non-liner data structure?
a) Stacks
b) List
c) Strings
d) Trees
Answer: Trees
6.  Which of the following data structure is linear type?
a) Graph
b) Trees
c) Binary tree
d) Stack
Answer: Stack
7.  Which data structure allows deleting data elements from and inserting at rear?
a) Stacks
b) Queues
c) Dequeues
d) Binary search tree
Answer: Queues
8. Inserting an item into the stack when stack is not full is called _________ Operation and deletion of item form the stack, when stack is not empty is called _________operation.
a) push, pop
b) pop, push
c) insert, delete
d) delete, insert
Answer: push, pop
9. Which of the following is true about the characteristics of abstract data types?
i) It exports a type.
ii) It exports a set of operations
a) True, False
b) False, True
c) True, True
d) False, False
Answer: True, True
10.  Finding the location of the element with a given value is:
a) Traversal
b) Search
c) Sort
d) None of the above
Answer: Search
11. Which of the following cannot be passed to a function?
a) Reference variable
b) Arrays
c) Class objects
d) Header files
Answer: Header files
12. The term __________ means the ability to take many forms.
a) Inheritance
b) Polymorphism
c) Member Function
d) Encapsulation
Answer: Polymorphism
13. Access to private data
a) Restricted to methods of the same class
b) Restricted to methods of other classes
c) Available to methods of the same class and other classes
d) Not an issue because the program will not compile
Answer: Restricted to methods of other classes
14. Which of the following keywords are used to control access to a class member?
a) default
b) break
c) protected
d) goto
Answer: protected
15. In a class specifier ,data or function designated private are accessible
a) To any function in the program
b) Only if you the password
c) To member functions of that class
d) Only to public members of the class
Answer: To member functions of that class
16.  The first index number in an array starts with _________ and the index number of an array of size n will be _________
a) 0, n-1
b) 1, n-1
c) 0, n
d) 1, n
Answer: 0, n-1
17. When the compiler cannot differentiate between two overloaded constructors, they are called
a) Overloaded
b) Destructed
c) Ambiguous
d) Dubious
Answer: Ambiguous
18. What features make C++ so powerful ?
a) Easy implementation
b) Reusing old code
c) Easy memory management
d) All of the above
Answer: All of the above
19.  Which of the following statement is correct regarding destructor of base class?
a) Destructor of base class should always be static.
b) Destructor of base class should always be virtual.
c) Destructor of base class should not be virtual.
d) Destructor of base class should always be private.
Answer: Destructor of base class should always be virtual.
20.  Which of the following keywords is used to control access to a class member?
a) Default
b) Break
c) Protected
d) Asm
Answer: Protected
21. You may override the class access specifiers
a) Public members
b) Public and protected members
c) Any specific class members you choose
d) No class members
Answer: Any specific class members you choose
22. C++ was originally developed by
a) Clocksin and Melish
b) Donald E.Knuth
c) Sir Richard Hadlee
d) Bjarne Stroustrup
Answer: Bjarne Stroustrup
23. What is the output of the program 
# Includ<isotrem.h>
void main()
{
     int n=1;
     cout<<endl<<"The numbers are;"<<endl;
     do
           {

cout <<n<<"\t";
n++;
           } while (n<=100);
     cout <<endl;
}

a) Print natural numbers 0 to 99
b) Print natural numbers 1 to 99
c) Print natural numbers 0 to 100
d) Print natural numbers 1 to 100
Answer: Print natural numbers 1 to 100
24. Which of the following type of data member can be shared by all instances of its class?
a) Public
b) Inherited
c) Static
d) Friend
Answer: Static
25. Which of the following also known as an instance of a class?
a) Friend Functions
b) Object
c) Member Functions
d) Member Variables
Answer: Object
26. Constructor is executed when _____.
a) an object is created
b) an object is used
c) a class is declared
d) an object goes out of scope
Answer: an object is created
27. Which of the following is not the member of class?
a) Static function
b) Friend function
c) Const function
d) Virtual function
Answer: Friend function
28.  cout is a/an __________ .
a) operator
b) function
c) object
d) macro
Answer: object
29. Which of the following is an abstract data type?
a) int
b) double
c) string
d) Class
Answer: Class
30. Which of the following approach is adapted by C++?
a) Top-down
b) Bottom-up
c) Right-left
d) Left-right
Answer: Bottom-up


Comments