C++ Multiple Choice Questions Set 1
21. Which of the
following is true about const member functions?
a. const members can be invoked on both const as well as nonconst objects
b. const members can be invoked only on const objects and not on nonconst objects
c. nonconst members can be invoked on const objects as well as nonconst objects
d. none of the above
a. const members can be invoked on both const as well as nonconst objects
b. const members can be invoked only on const objects and not on nonconst objects
c. nonconst members can be invoked on const objects as well as nonconst objects
d. none of the above
22. Which of the following relationship is known as
inheritancerelationship?
a. ‘has-a’ relationship
b. ‘is-a’ relationship
c. association relationship
d. none of the above
a. ‘has-a’ relationship
b. ‘is-a’ relationship
c. association relationship
d. none of the above
23. If class A is friend of class B and if class B is friend of
class C, which of the following is true?
a. Class C is friend of class A
b. Class A is friend of class C
c. Class A and Class C do not have any friend relationship
d. None of the above
a. Class C is friend of class A
b. Class A is friend of class C
c. Class A and Class C do not have any friend relationship
d. None of the above
24. A direct access file is:
a. A file in which recoreds are arranged in a way they are inserted in a file
b. A file in which records are arranged in a particular order
c. Files which are stored on a direct access storage medium
d. None of the above
a. A file in which recoreds are arranged in a way they are inserted in a file
b. A file in which records are arranged in a particular order
c. Files which are stored on a direct access storage medium
d. None of the above
25. Which of the following is not a component of file system
a. Access method
b. Auxiliary storage management
c. Free integrity mechanism
d. None of the above
a. Access method
b. Auxiliary storage management
c. Free integrity mechanism
d. None of the above
26. Seek time is
a. time taken to retrieve a dta
b. Time taken by read/write head mechanism to position itself over appropriate cylinder
c. Time taken by appropriate sector to come under read/write
d. None of the above
a. time taken to retrieve a dta
b. Time taken by read/write head mechanism to position itself over appropriate cylinder
c. Time taken by appropriate sector to come under read/write
d. None of the above
27. ‘Prime area’ in context of file system is defined as
a. It is memory area created by operating system
b. It is an area into which data records are written
c. It is the main area of a web page
d. None of the above
a. It is memory area created by operating system
b. It is an area into which data records are written
c. It is the main area of a web page
d. None of the above
28. In mulit-list organization
a. Records that have equivalent value for a given secondary index item are linked together to form a list.
b. Records are loaded in ordered sequence defined by collating sequence by content of the key
c. Records are directly accessed by record key field
d. None of the above
a. Records that have equivalent value for a given secondary index item are linked together to form a list.
b. Records are loaded in ordered sequence defined by collating sequence by content of the key
c. Records are directly accessed by record key field
d. None of the above
29. Which of the following is/are advantages of cellular
partitioned structure:
a. Simultaneous read operations can be overlapped
b. Search time is reduced
c. Both a & b
d. None of the above
a. Simultaneous read operations can be overlapped
b. Search time is reduced
c. Both a & b
d. None of the above
30. *ptr++ is equivalenet to:
a. ptr++
b. *ptr
c. ++*ptr
d. None of the above
a. ptr++
b. *ptr
c. ++*ptr
d. None of the above
31. The conditional compilation
a. It is taken care of by the compiler
b. It is setting the compiler option conditionally
c. It is compiling a program based on a condition
d. none of above
a. It is taken care of by the compiler
b. It is setting the compiler option conditionally
c. It is compiling a program based on a condition
d. none of above
32. Originally ‘C’ was developed as:
a. System programming language
b. General purpose language
c. Data processing language
d. None of above
a. System programming language
b. General purpose language
c. Data processing language
d. None of above
33. An inverted file
a. Locates information about data in small files that are maintained apart from actual data record
b. A file which stores opposite records
c. A file which stores information about records of a system
d. None of above
a. Locates information about data in small files that are maintained apart from actual data record
b. A file which stores opposite records
c. A file which stores information about records of a system
d. None of above
34. Which of the following is not a file operation:
a. Repositioning
b. Truncating
c. Appending
d. None of above
a. Repositioning
b. Truncating
c. Appending
d. None of above
35. Latency time is:
a. Time taken by read/write head mechanism to position itself over appropriate cylinder
b. Time taken to transfer a dta from memory
c. Time taken by appropriate sector to come under read/write head
d. None of above
a. Time taken by read/write head mechanism to position itself over appropriate cylinder
b. Time taken to transfer a dta from memory
c. Time taken by appropriate sector to come under read/write head
d. None of above
36. The two types of file structure existing in VSAM file are
a. Key sequenced structure, entry sequenced structure
b. Key sequence structure, exit sequenced structure
c. Entry sequence structure, exit sequenced structure
d. None of above
a. Key sequenced structure, entry sequenced structure
b. Key sequence structure, exit sequenced structure
c. Entry sequence structure, exit sequenced structure
d. None of above
37. How many copies of
a class static member are shared between objects of the class?
a. A copy of the static member is shared by all objects of a class
b. A copy is created only when at least one object is created from that class
c. A copy of the static member is created for each instntiation of the class
d. No memory is allocated for static members of a class
a. A copy of the static member is shared by all objects of a class
b. A copy is created only when at least one object is created from that class
c. A copy of the static member is created for each instntiation of the class
d. No memory is allocated for static members of a class
38. Which looping process checks the test condition at the end
of the loop?
a. for
b. while
c. do-while
d. no looping process checks the test condition at the end
a. for
b. while
c. do-while
d. no looping process checks the test condition at the end
39. The default access level assigned to members of a class is
___________
a. Private
b. Public
c. Protected
d. Needs to be assigned
a. Private
b. Public
c. Protected
d. Needs to be assigned
40. Which of the
following correctly describes the meaning of‘namespace’ feature in C++?
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces refer to space between the names in a program
c. Namespaces refer to packing structure of classes in a program.
d. Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.
a. Namespaces refer to the memory space allocated for names used in a program
b. Namespaces refer to space between the names in a program
c. Namespaces refer to packing structure of classes in a program.
d. Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.
Correct Answers to C++
MCQ Questions
21 – b
|
22 – a
|
23 – b
|
24 – c
|
25 – c
|
26 – d
|
27 – b
|
28 – b
|
29 – a
|
30 – c
|
31 – d
|
32 – c
|
33 – b
|
34 – a
|
35 – d
|
36 – c
|
37 – c
|
38 – a
|
39 – c
|
40 – a
|
very informative blog and useful article thank you for sharing with us , keep posting learn
ReplyDeletemore about Dot net
Dot NET Online Course Hyderabad