Question: What is wrong with the following program? #include int what _ is _ 2 x 2 8 1 ( ) { int x , y

What is wrong with the following program?
#include
int what_is_2x281(){
int x, y =281;
return x += y;
}// what_is_2x281()
int main(){
std::cout << "What is 2 x 281?
"<< what_is_2x281();
}// main()
Group of answer choices
the += operator cannot be used after a return statement, since x would be returned before being added to y
what_is_2x281() returns an uninitialized value
the type of y is undefined
main() must have a return statement
nothing is wrong with this program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!