A continue statement causes execution to skip to
1.the return 0; statement
2.the first statement after the loop
3.the statement following the continue statement
4.the next iteration of the loop
Each pass through a loop is called a/an
1.enumeration
2. iteration
3.culmination
4.pass through
If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?
1.X&
2.X*
3. const X* const
4.X* const
In mulit-list organization
1.Records that have equivalent value for a given secondary index item are linked together to form a list.
2.Records are loaded in ordered sequence defined by collating sequence by content of the key
3.Records are directly accessed by record key field
4.None of the above
Originally ‘C’ was developed as
1.System programming language
2.General purpose language
3.Data processing language
4.none of the above
The default access level assigned to members of a class is _________
1.Private
2.Public
3.Protected
4.Needs to be assigned
What does STL stand for?#
1.Simple Template Library
2.Standard Template Library
3.Static Type Library
4.Single Type-based Library
What’s wrong? (x = 4 && y = 5) ? (a = 5) ; (b = 6)
1.the question mark should be an equal sign
2.the first semicolon should be a colon
3.there are too many variables in the statement
4. the conditional operator is only used with apstrings
What’s wrong? for (int k = 2, k <=12, k++)
1. the increment should always be ++k
2.the variable must always be the letter i when using a for loop
3.there should be a semicolon at the end of the statement
4.the commas should be semicolons
Which of the following correctly describes C++ language?
1.Statically typed language
2.Dynamically typed language
3.Both Statically and dynamically typed language
4.Type-less language
Which of the following is/are advantages of cellular partitioned structure
1.Simultaneous read operations can be overlapped
2.Search time is reduced
3.Both a & b
4. None of the above
*ptr++ is equivalenet to
1.ptr++
2.*ptr
3.++*ptr
4. None of the above
An inverted file
1. Locates information about data in small files that are maintained apart from actual data record
2.A file which stores opposite records
3.A file which stores information about records of a system
4.none of the above
class derived: public base1, public base2 { } is an example of
1.Polymorphic inheritance
2.Multilevel inheritance
3.Hierarchical inheritance
4.Multiple inheritance
direct access file is:
1.A file in which recoreds are arranged in a way they are inserted in a file
2.A file in which records are arranged in a particular order
3.Files which are stored on a direct access storage medium
4.none of the above
Expression C=i++ causes
1.Value of i assigned to C and then i incremented by 1
2.i to be incremented by 1 and then value of i assigned to C
3.Value of i assigned to C
4. i to be incremented by 1
How do we declare an abstract class?
1.By providing at least one pure virtual method (function signature followed by ==0;) in a class
2.By declaring at least one method abstract using the keyword ‘abstract’ in a class
3.By declaring the class abstract with the keyword ‘abstract’
4.It is not possible to create abstract classes in C++
How do we declare an ‘interface’ class?
1. By making all the methods pure virtual in a class
2.By making all the methods abstract using the keyword ‘abstract’ in a class
3.By declaring the class as interface with the keyword ‘interface’
4.It is not possible to create interface class in C++
How many copies of a class static member are shared between objects of the class?
1.A copy of the static member is shared by all objects of a class
2.A copy is created only when at least one object is created from that class
3.A copy of the static member is created for each instntiation of the class
4.No memory is allocated for static members of a class
If class A is friend of class B and if class B is friend of class C, which of the following is true?
1.Class C is friend of class A
2.Class A is friend of class C
3.Class A and Class C do not have any friend relationship
4.none of the above
Latency time is
1.Time taken by read/write head mechanism to position itself over appropriate cylinder
2. Time taken to transfer a dta from memory
3. Time taken by appropriate sector to come under read/write head
4.None of above
Prime area’ in context of file system is defined as
1.It is memory area created by operating system
2.It is an area into which data records are written
3. It is the main area of a web page
4.None of the above
Seek time is
1.time taken to retrieve a dta
2.Time taken by read/write head mechanism to position itself over appropriate cylinder
3.Time taken by appropriate sector to come under read/write
4.None of the above
The conditional compilation
1. It is taken care of by the compiler
2.It is setting the compiler option conditionally
3.It is compiling a program based on a condition
4. None of the above
The two types of file structure existing in VSAM file are
1.Key sequenced structure, entry sequenced structure
2.Key sequence structure, exit sequenced structure
3.Entry sequence structure, exit sequenced structure
4.none of the above
What happens when a pointer is deleted twice?
1.It can abort the program
2.It can cause a failure
3.It can cause an error
4.It can cause a trap
What is the difference between overloaded functions and overridden functions?
1.Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding
2.Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called an overloaded function.
3.Overloading is a static or compile-time binding and Overriding is dynamic or run-time binding
4.Redefining a function in a friend class is called function overloading while Redefining a function in a derived class is called as overridden function.
What’s wrong? while( (i < 10) && (i > 24))
1.the logical operator && cannot be used in a test condition
2.the while loop is an exit-condition loop
3. the test condition is always false
4.the test condition is always true
When is std::bad_alloc exception thrown?
1.When new operator cannot allocate memory
2.When alloc function fails
3.When type requested for new operation is considered bad, thisexception is thrown
4.When delete operator cannot delete the allocated (corrupted) object
Which classes allow primitive types to be accessed as objects?
1.Storage
2.Virtual
3.Friend
4.Wrapper
Which looping process checks the test condition at the end of the loop?
1.for
2.while
3.do-while
4.no looping process checks the test condition at the end
Which of the following correctly describes the meaning of ‘namespace’ feature in C++?
1.Namespaces refer to the memory space allocated for names used in a program
2.Namespaces refer to space between teh names in a program
3.Namespaces refer to space between the names in a program
4.namespaces provide facilities for organizing the names in a program to avoid name clashes
Which of the following correctly describes the meaning of‘namespace’ feature in C++?
1.Namespaces refer to the memory space allocated for names used in a program
2.Namespaces refer to space between the names in a program
3.Namespaces refer to packing structure of classes in a program.
4.Namespaces provide facilities for organizing the names in aprogram to avoid name clashes.
Which of the following is a valid destructor of the class name “Country”
1. int ~Country()
2.void Country()
3. int ~Country(Country obj)
4.. void ~Country()
Which of the following is not a component of file system
1.Access method
2.Auxiliary storage management
3.Free integrity mechanism
4.None of the above
Which of the following is not a file operation:
1.Repositioning
2.Truncating
3.Appending
4.none of the above
Which of the following is not a standard exception built in C++.
1.std::bad_creat
2.std::bad_alloc
3.std::bad_cast
4.std::bad_typeid
Which of the following is not an advantage of secondary memory
1. It is cost-effective
2. It has large storage capacity
3.It has highest speed
4.It is easily portable
Which of the following is not recommended in a header file?
1. Type definitions (typedefs)
2.Class definitions
3.Function definitions
4.Template definitions
Which of the following is not true about preprocessor directives
1. They begin with a hash symbol
2.They are processed by a preprocessor
3.They form an integral part of the code
4.They have to end with a semi colon
Which of the following is the most preferred way of throwing and handling exceptions?
1.Throw by value and catch by reference.
2.Throw by reference and catch by reference.
3.Throw by value and catch by value
4.Throw the pointer value and provide catch for the pointer type.
Which of the following is true about const member functions?
1.const members can be invoked on both const as well as nonconst objects
2.const members can be invoked only on const objects and not on nonconst objects
3.nonconst members can be invoked on const objects as well as nonconst objects
4.none of the above
Which of the following keyword supports dynamic method resolution?
1.abstract
2.Virtual
3.Dynamic
4.Typeid
Which of the following language feature is not an access specifier in C++?
1.public
2.private
3.protected
4.internal
Which of the following language is not supported by C++?
1.Exception Handling
2.Reflection
3.Operator Overloading
4.Namespaces
Which of the following languages is a subset of C++ language?
1. C language
2.Java Language
3.C# language
4.language
Which of the following relationship is known as inheritancerelationship?
1.has-a’ relationship
2.is-a’ relationship
3. association relationship
4.none of the above
Which of the STL containers store the elements contiguously (in adjacent memory locations)?
1.std::vector
2.std::list
3.std::map
4.std::set
Which one of the following is not a fundamental data type in C++
1.float
2.string
3.int
4.wchar_t
Which one of the following is not a valid reserved keyword in C++
1.Explicit
2.Public
3.Implicit
4.Private