ExamVeda
Login
Home
91
Which is used to tell the computer that where a pointer is pointing to?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
92
What will be the output of the following C++ code?
#include <iostream>
#include <cmath>
using namespace std;
class Complex
{
    private:
    double real;
    double imag;
    public:
    Complex(double r = 0.0, double i = 0.0) : real(r), imag(i)
    {}
    double mag()
    {  
        return getMag();
    }
    operator double ()
    {
        return getMag();
    }
    private:
    double getMag()
    {
        return sqrt(real * real + imag * imag);
    }
};
int main()
{
    Complex com(3.0, 4.0);
    cout << com.mag();
    cout << com;
    return 0
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
93
What is the scope of typedef defined data types?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
94
What is the associativity of add(+);?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
95
Which is called ternary operator?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
96
How the objects are self-referenced in a member function of that class.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
97
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
class number
{
    int i;
    public:
    int geti();
    void puti(int j);
};
int number::geti()
{
    return i;
}
void number::puti(int j)
{
    i = j;
}
int main()
{
    number s;
    s.puti(10);
    cout << s.geti( );
    return 0;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
98
How many objects can present in a single class?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
99
How many member functions are there in this C++ class excluding constructors and destructors?
class Box
{
	int capacity;
   public:
	void print();
	friend void show();
	bool compare();
	friend bool lost();
};
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
100
In which form does the function call operator can be overloaded?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board