What will be the output of the following C++ program? #include <iostream>…
PYQ DSSSB 2022
What will be the output of the following C++ program?
#include <iostream>
using namespace std;
class Wall {
private:
double length;
public:
Wall() {
length = 5.5;
cout << "Creating a wall." << endl;
cout << "Length = " << length << endl;
}
};
int main() {
Wall wall1;
return 0;
}- A.
Creating a wall Length = 5.5
- B.
Creating a wall
- C.
Length = 5.5
- D.
Compile time error
Attempted by 439 students.
Sign up free to check your answer
Sign up freeLoading lesson…

