Answer to Question #299403 in C++ for Janel

Question #299403

Debug and Display the output.

1.

#include

using namespace std;


myFunction() {

cout << "I just got executed!";

}


int main() {

myFunction();

return 0;

}


2.

#include

using namespace std;


void myFunction() {

cout << "I just got executed!\n";

}


int() {

myFunction();

myFunction();

myFunction();

return 0;

}


1
Expert's answer
2022-02-18T07:31:25-0500
1
#include <iostream>
#include <string>
using namespace std;




void myFunction() {
	cout << "I just got executed!";
}
int main() {
	myFunction();
	system("pause");
	return 0;
}





2



#include <iostream>
#include <string>
using namespace std;




void myFunction() {


	cout << "I just got executed!\n";


}
int main() {
	myFunction();


	myFunction();


	myFunction();
	system("pause");
	return 0;
}




Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog