What is the output of the following C++ code?

closed account (G187ko23)
void fun1 ( int &K, int F)
{ int S=50;
cout<<"In Fun1 : \n"<<S<<endl;
cout<< K<<" "<<F<<endl;
K+=2; F++;
cout<< K<<" "<<F<<endl;
}
int main ( )
{
int J =22 , S = 3 ;
cout<<J<<" "<<S<<endl;
fun1( J, S);
cout<<J<<" "<<S<<endl;
return 0;}
22 3
In Fun1 :
50
22 3
24 4
24 3
Press any key to continue . . .


Do you have a compiler installed?
Last edited on
> Press any key to continue . . .
that is not part of the program output.
closed account (G187ko23)
yes I know
Topic archived. No new replies allowed.