0
please answer this common code in challenges..
#include <iostream> using namespace std; void a(int x,int y){ x=10;y=2; return x/y; } int main() { a(30); cout<< a; return 0; }
8 Antworten
+ 7
Yeah the return type is void that means that function shouldn't return anything
+ 4
15?
+ 3
Oh! It must be int a,no void
+ 2
And not a(30,7); cout<<a;
But cout<<a(30,7); and output is 5.
+ 1
And we must to declare y in main.
+ 1
please mention the options. coz i never found this question.
+ 1
there will be an error, because the return type of the function void a(int x, int y) is void. The fact that there is a return statement in the function results in an error.
0
no its not....
I never get this challenge question correct..I tried 5....
but its wrong....