Ask Question

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

+2
Answers (1)
  1. 5 September, 00:19
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers