How many types of class relationships are there in object-oriented programming?
What does ADT stand for?
Which of the following is illegal?
int foo = 10;
decltype(foo) bar;
cout << foo;
cout << bar << endl;
all needed library are already included .
Which of the following class allows to declare only one object of it?
In the case of friend operator overloaded functions, how many object arguments can a unary operator overloaded function take at maximum?
What is the output of the following C program?
int main()
{
int arr[10];
printf("%d", *arr + 5 - *arr + 3);
}
What is the primary purpose of a constructor in object-oriented programming?
What will be the output of the following C++ code?
#include<iostream>
using namespace std;
int x[100];
int main()
{
cout << x[99] << endl;
}
Here is part of a graphics program that simulates a color fading in the sun. The amount of yellow starts at a maximum of 1.0 and is faded by decreasing it by 1% each time the loop executes until it is close to zero.
float yellowLevel = 1.0;
while ( yellowLevel > 0.001 )
{
yellowLevel = yellowLevel * 0.99 ;
// the new yellowLevel is used herein some graphics methods
}
Pick a condition for the while statement.