Home / MCQ Bank / Computer
Computer Functions And Procedures In C Plus Plus Difficulty: Medium

What will be the output of the following C++ code? #include <iostream> using namespace std; int mult (int x, int y) { int result; result = 0; while (y != 0) { result = result + x; y = y - 1; } return(result); } int main () { int x = 5, y = 5; cout << mult(x, y) ; return(0); }

Select the correct option to test your answer:

More Computer Questions

Which of the following share a similarity in syntax? 1. Union, 2. Structure, 3. Arrays and 4. Pointers What will be the output of the following C code? #include <stdio.h> int main() { int i = 1; if (i++ && (i == 1)) printf("Yes\n"); else printf("No\n"); } . . . . . . . . is used to get library location in R. The following python program can work with . . . . . . . . parameters. def f(x): def f1(*args, **kwargs): print("Examveda") return x(*args, **kwargs) return f1 What is the output of the following code: struct Point { int x, y; }; Point p1; p1.x = 10; p1.y = 20; cout << p1.x << " " << p1.y; in C++?