online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> //define function to swap values void swap(int *a , int *b) { int temp; temp=*a; *a=*b; *b=temp; } void main() { int firstNumber, secondNumber; //get two number from user and save it in variable firstNumber, secondNumber printf("\nPlease Enter the value of First Number and Second Number\n"); scanf("%d %d", &firstNumber, &secondNumber); //print numbers before swapping them (example: firstNumber=10, secondNumber =20) printf("\nBefore Swapping First Number = %d and Second Number = %d\n", firstNumber,secondNumber); //call swapping function by passing reference of variables swap(&firstNumber, &secondNumber); //print swapped numbers printf("\nAfter Swapping: First Number = %d and Second Number = %d\n", firstNumber, secondNumber ); }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text



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