0
Q:

What is the output of this program?

#include
        using namespace std;
        void fun(int x, int y)
        {
            x = 20;
            y = 10;
        }
        int main()
        {
            int x = 10;
            fun(x, x);
            cout << x;
            return 0;
        }

A) 10 B) 20
C) compile time error D) none of these

Answer:   A) 10



Explanation:

In this program, we called by value so the value will not be changed, So the output is 10

Subject: C++
Q:

Which of the following methods doesn't use sorting?

A) Insertion B) Deletion
C) Exchange D) Selection
 
Answer & Explanation Answer: A) Insertion

Explanation:

Using insertion we can perform insertion sort, using selection we can perform selection sort, using exchange we can perform the bubble sort.But by using deletion we cannot perform any sort.

Report Error

View Answer Report Error Discuss

Filed Under: C++

1 4459
Q:

Which among the following are not access Specifiers in C++?

A) Public B) Protected
C) Default D) Private
 
Answer & Explanation Answer: C) Default

Explanation:

Default is the access specifier in java not in C++

Report Error

View Answer Report Error Discuss

Filed Under: C++

4 6864