Cpp Programming 87 – Which of the following is not a type of constructor?
[B]. Friend constructor[C]. Default constructor
[D]. Parameterized constructor
Answer: Option B
Answer: Option B
Answer: Option D
#include
long GetNumber(long int Number)
{
return --Number;
}
float GetNumber(int Number)
{
return ++Number;
}
int main()
{
int x = 20;
int y = 30;
cout<< GetNumber(x) << " ";
cout<< GetNumber(y) ;
return 0;
}
[A].The program will print the output 19 31.
[B].The program will print the output 20 30.
[C].The program will print the output 21 31.
[D].The program will print the output 21 29.
Answer: Option C
ASCII value of 99
[C].
Garbage value
[D].
99.50
Answer: Option B
Explanation:
No answer description available for this question.
Answer: Option D
Answer: Option C
#include
class IndiaBix
{
static int count;
public:
static void First(void)
{
count = 10;
}
static void Second(int x)
{
count = count + x;
}
static void Display(void)
{
cout<< count << endl;
}
};
int IndiaBix::count = 0;
int main()
{
IndiaBix :: First();
IndiaBix :: Second(5);
IndiaBix :: Display();
return 0;
}
[A].0
[B].5
[C].10
[D].15
Answer: Option D