Home
Current Affairs January 2024

What is the correct answer?

4

What is the value of Friday in the following - enum days { Monday, Tuesday, Wednesday = -1, Thursday, Friday, Saturday = 6, Sunday}

A. 1

B. 5

C. 0

D. -3

Correct Answer :

A. 1


Related Questions

What is the correct answer?

4

What is the value of Friday in the following - enum days { Monday, Tuesday, Wednesday = -1, Thursday, Friday, Saturday = 6, Sunday}

A. 1

B. 5

C. 0

D. -3

What is the correct answer?

4

Reference to an object behaves like a constant pointer.

A. True

B. False

What is the correct answer?

4

Class is similar to a variable.

A. True

B. False

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

The value of 'this' pointer can be changed.

A. True

B. False

What is the correct answer?

4

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

What is the correct answer?

4

In C++, identifiers have to be declared at the beginning of the blocks.

A. True

B. False

What is the correct answer?

4

Constructor returns void type value.

A. True

B. False

What is the correct answer?

4

_______ argument(s) are passed in case of binary overloaded operators.

A. Two

B. One

C. No

D. None of the above

What is the correct answer?

4

Data objects can be initialized when allocating memory using 'new'.

A. True

B. False

What is the correct answer?

4

Delete operator is used

A. To allocate storage

B. To deallocate storage

C. To delete variable name

D. None of the above are correct

What is the correct answer?

4

A member function can always access the data

A. In the object of which it is a member

B. In the class of which it is a member

C. In the object of the class of which it is a member

D. In the public part of its class

What is the correct answer?

4

main() returns a value of type

A. real

B. char

C. int

D. null

What is the correct answer?

4

Which of the following can legitimately be passed to a function?

A. A constant

B. A variable

C. A structure

D. A header file

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

When you overload an arithmetic assignment operator, the result

A. Goes in the object to the right of the operator

B. Goes in the object to the left of the operator

C. Goes in the object of which the operator is a member

D. Must be returned

What is the correct answer?

4

The members of a class by default are private.

A. True

B. False

What is the correct answer?

4

The new operator always returns a void pointer.

A. True

B. False

What is the correct answer?

4

Sharing of common information are achieved by the concept of

A. Virtual copying

B. Inheritance

C. Encapsulation

D. None of these

What is the correct answer?

4

We cannot have the address of a constructor.

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

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

The library function exit() causes an exit from

A. The loop in which it occurs

B. The block in which it occurs

C. The function in which it occurs

D. The program in which it occurs

What is the correct answer?

4

Static data member can be declared as const too.

A. True

B. False

What is the correct answer?

4

If a friend function is declared inside a class it can access all data members of the class.

A. True

B. False

What is the correct answer?

4

The ?: can be used to replace

A. if-else statement

B. wild cards

C. no meaning in C++

D. returns the value

What is the correct answer?

4

Pick out the most appropriate statement from the following

A. references are pointers

B. array of references can be created

C. you can not reference a reference variable

D. all of the above

What is the correct answer?

4

Private members of a structure can be accessed directly from the outside of the structure.

A. True

B. False

What is the correct answer?

4

Static data member occurs in only class scope.

A. True

B. False

What is the correct answer?

4

Inline functions_____________ call overload.

A. Increase

B. Reduce

C. None of the above are correct