online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include<iostream> //---------vvvvv---------vvvvv----------->const added here void swap (const char *&x,const char *&y) //---------------------^--------------^--> & added here { //vvvvv---------------------------------->const added here const char *t = x; x = y; y = t; } int main() { //-vvvvv------------------------------->const added here const char *x = "geeksquiz"; //-vvvvv------------------------------->const added here const char *y = "geeksforgeeks"; swap(x, y); //pass arguments by reference std::cout<<x << " "<<y; return 0; }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue