I'm trying to find the output of the following code. How can i add a return statement to magicTime? The out put should be a: 10 b: 30 c: a: 10 b: 30
#include <iostream>
using namespace std;
int magicTime(int a, int &b, const int &c){
a=c;
b=20;
}
int main(){
int a = 10;
int b = 30;
int c;
cout << "a: " << a << " b " << b << " c " << c << endl;
c=b;
magicTime(c, b, a);
cout << "a: " << a << " b " << b << " c " << c << endl;
return 0 ;
}