0
Q:

What is the output of this program?

 #include
       using namespace std;
       int main()
       {
           int arr[] = {4, 5, 6, 7};
           int *p = (arr + 1);
           cout << arr;
           return 0;
       }

A) 4 B) 5
C) address of arr D) 7

Answer:   C) address of arr



Explanation:

As we couted to print only arr, it will print the address of the array.

Subject: C++
Q:

Explain storage qualifiers in C++

Answer

i.) Const - This variable means that if the memory is initialised once, it should not be altered by a program. 


ii.) Volatile - This variable means that the value in the memory location can be altered even though nothing in the program code modifies the contents. 


iii.) Mutable - This variable means that a particular member of a structure or class can be altered even if a particular structure variable, class, or class member function is constant.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

1 3375
Q:

Where does the allocaters are implemented?

A) Template library B) Standard library
C) C++ code library D) None of these
 
Answer & Explanation Answer: B) Standard library

Explanation:

Allocaters are implemented in C++ standard library but it is used for C++ template library.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 3539
Q:

How the different permutations are ordered in c++?

A) Compare lexicographicaly to each other elements B) By finding the highest element in the range
C) By finding the lowest element in the range D) None of the mentioned
 
Answer & Explanation Answer: A) Compare lexicographicaly to each other elements

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4037
Q:

Which keyword is used to declare the min and max functions?

A) iostream B) string
C) algorithm D) None of these
 
Answer & Explanation Answer: C) algorithm

Explanation:

Algorithm header file contain the supporting files needed for the execution of these functions.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 6930
Q:

What is meant by heap?

A) Used for fast reterival of elements B) Used for organising the elements
C) Both a & b D) None of the mentioned
 
Answer & Explanation Answer: C) Both a & b

Explanation:

A heap is a way to organize the elements of a range that allows for fast retrieval of the element.

Report Error

View Answer Report Error Discuss

Filed Under: C++

2 3591
Q:

What is the kind of execution does sequence point allow?

A) Non-overlap B) Overlap
C) Concurrent D) None of these
 
Answer & Explanation Answer: A) Non-overlap

Explanation:

To resolve all the side-effects in the program, the sequence point should not be overlapped.

Report Error

View Answer Report Error Discuss

Filed Under: C++

2 4405
Q:

What kind of object is modifying sequence algorithm?

A) Function template B) Class template
C) Method D) None of these
 
Answer & Explanation Answer: A) Function template

Explanation:

It is a group of functions and implemented under algorithm header file.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 2871
Q:

How many parameters are present in mismatch method in non-sequence modifying
algorithm?

A) 1 B) 2
C) 3 D) 4
 
Answer & Explanation Answer: D) 4

Explanation:

There are four parameters. They are first1, last1, first2, predicate.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 6297