Home
Current Affairs January 2024

What is the correct answer?

4

Static member functions have file scope.

A. True

B. False

Correct Answer :

A. True


Related Questions

What is the correct answer?

4

In case of nested class, enclosing class can directly access the private data member of nested class.

A. True

B. False

What is the correct answer?

4

What is the output of the following program segment - for(i = 1, j = 0; i < 10; i++) j += i; cout <<i<<"
";

A. 10

B. 20

C. 55

D. there is an error in the program

What is the correct answer?

4

The characteristic that data can be manipulated only through member functions that are part of the class is called

A. Encapsulation

B. Data dependency

C. Inheritance

D. Instantiation

What is the correct answer?

4

Operator overloading is

A. Making C++ operators work with objects

B. Making C++ operators more then they can handle

C. Giving new meaning to existing c++ operators

D. Making new C++ operators

What is the correct answer?

4

Which of the following are good reasons to use an object oriented language?

A. You can define your data types

B. Program statements are simpler than in procedural languages.

C. An OO program can be taught to correct its own errors.

D. It's easier to conceptualize an OO program.

What is the correct answer?

4

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

What is the correct answer?

4

ios containes a pointer to streambuf.

A. True

B. False

What is the correct answer?

4

A destructor can have arguments like constructor.

A. True

B. False

What is the correct answer?

4

The binding that binds a function call at run time is called

A. early binding

B. run time binding

C. late binding

D. linking

What is the correct answer?

4

In C++, the keyword auto can be used for

A. Automatic assignment of data to object during instantiation

B. Automatic call of a function

C. To declare a local variable

D. It is not a keyword in C++

What is the correct answer?

4

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

What is the correct answer?

4

The declaration int **var1; shows that

A. var1 can not be accessed

B. var1 is a pointer to a pointer of type int

C. var1 is a protected data type of integer

D. this type declaration shows an error

What is the correct answer?

4

When one object initializes another object the following function is invoked

A. copy constructor

B. new

C. instantiation

D. none of the above

What is the correct answer?

4

Inline functions_____________ call overload.

A. Increase

B. Reduce

C. None of the above are correct

What is the correct answer?

4

A normal C++ operator that acts in a special way on newly defined data types is said to be

A. Glorified

B. Encapsulated

C. Classified

D. Overloaded

What is the correct answer?

4

_____________ operator must have one class object

A. +

B. new

C. all

D. None of these

What is the correct answer?

4

A copy constructor is used to copy an object member wise to another object of the same class.

A. True

B. False

What is the correct answer?

4

cc ___________ option is used only to create object file

A. -a

B. -o

C. -c

D. none of these

What is the correct answer?

4

Member function cannot be called from within a constructor.

A. True

B. False

What is the correct answer?

4

By default, C++ uses the following method of passing arguments

A. Call-by-Reference

B. Call-by-Value

C. Call-by-Pointer

D. None of the above

What is the correct answer?

4

In C++, an identifier must be initialized using constant expression.

A. True

B. False

What is the correct answer?

4

The following syntax is valid. void inline gram_ panchayat :: show_gram_ panchayat_info().

A. True

B. False

What is the correct answer?

4

A function that is called automatically when an object is destroyed is known as

A. instantiation

B. function prototype

C. constructor

D. destructor

What is the correct answer?

4

The exception is processed using

A. unexpected()

B. perform()

C. catch()

D. try()

What is the correct answer?

4

Classes are useful because they

A. Are removed from memory when not in use

B. Permit data to be hidden from other classes

C. Bring together all aspects of an entity in one place

D. Can closely model objects in the real world

What is the correct answer?

4

When a language has the capacity to produce new data type, it is said to be

A. Reprehensible

B. Encapsulated

C. Overload

D. Extensible

What is the correct answer?

4

Static data member occurs in only class scope.

A. True

B. False

What is the correct answer?

4

The member of a structure can be accessed through a pointer by

A. ->

B. dot operator

C. ::

D. >>

What is the correct answer?

4

Public data members can be accessed

A. Only from the base class itself

B. Both form the base class and from its derived classes

C. From the class which is friend of the base class

D. None of the above are correct

What is the correct answer?

4

Dynamic memory can be allocated by the following declaration

A. new

B. volatile

C. static

D. ==