Menu

Consider The Following Code. In This Code The Function DisplayClass(StackClass) Is Called.Which Of The Following Code (I) Represents The Correct Implementation Of The DisplayClass Function?#Include #Include //…(I)… Missing Code For The Function.Int Main() {Std::Stack StackClass; StackClass.Push(“John”);

Consider The Following Code. In This Code The Function DisplayClass(StackClass) Is Called.Which Of The Following Code (I) Represents The Correct Implementation Of The DisplayClass Function?#Include <Stack>#Include <String>//…(I)… Missing Code For The Function.Int Main() {Std::Stack<Std::String> StackClass; StackClass.Push(“John”);

Consider the following code. In this code the function displayClass(stackClass) is called.

Which of the following code (i) represents the correct implementation of the displayClass function?

#include <stack>

#include <string>

//…(i)… missing code for the function.

int main() {

std::stack<std::string> stackClass; stackClass.push(“John”); stackClass.push(“Peter”); stackClass.push(“Mary”); displayClass(stackClass);

return 0;

Expert Answer

Step 1

The correct im…

OR