Cpp Programming Quiz 56 – Which of the following concepts means adding new components to a program as it runs?
[B]. Dynamic typing[C]. Dynamic binding
[D]. Dynamic loading
Answer: Option D
Answer: Option D
[B].
[C].
[D].
Answer: Option C
Explanation:
The statement int arr[size]; produces an error, because we cannot initialize the size of array dynamically. Constant expression is required here.
Example: int arr[10];
One more point is there, that is, usually declaration is not allowed after calling any function in a current block of code. In the given program the declaration int arr[10]; is placed after a function call scanf().
[B].
[C].
[D].
Answer: Option B
Explanation:
No answer description available for this question.
Answer: Option C
Answer: Option D
Answer: Option B
#include
class BixTeam
{
int x, y;
public:
BixTeam(int xx)
{
x = ++xx;
}
void Display()
{
cout<< --x << " ";
}
};
int main()
{
BixTeam objBT(45);
objBT.Display();
int *p = (int*)&objBT;
*p = 23;
objBT.Display();
return 0;
}
[A].45 22
[B].46 22
[C].45 23
[D].46 23
Answer: Option A