+ 3
Error token
What will be the output of this code? #include <iostream> using namespace std; class Calc{ public: int a(int x, int y){return x+y;} int b(int x, int y){return x-y;} int c(int x, int y){return x*y;} int d(int x, int y){return x/y;} }; int main() { cout<<Calc.c(2,2); return 0; }
3 Answers
+ 1
I don't see why it's an error? I guess the output would be just 4, since 2*2 is 4. And I didn't get what are you talking about, Default