Ask Question
8 November, 03:45

What will be displayed on the

console given the following code fragment?

int main () {

int num1 = 3;

int num2 = 4;

myFunction (num1, num2);

system ("pause");

return 0;

}

void myFunction (int num1Par, int num2Par) {

cout << num1Par << num2Par;

}

A) 33

B) 34

C) 35

D) 36

+4
Answers (1)
  1. 8 November, 06:00
    0
    The answer to this question is the option "B".

    Explanation:

    In c+ + program that is given in the question. The explanation of the program can be given as:

    This program starts with the main method in the main method there are two integer variable defines with there value that is num1=3 and num2=4. Then we call the function that is myFunction () function. In this function, we pass the variable num1 and num2 as a parameter and end of the main function or method. Then we define the myFunction () function. This function does not return any value because its return type is void. In this function, we print the value that is passed in the parameter. So the answer to this question is option B which is 34.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “What will be displayed on the console given the following code fragment? int main () { int num1 = 3; int num2 = 4; myFunction (num1, num2); ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers