c++ ->

#include <iostream>

// Function declaration
void swap(int& a, int& b);

int main() {
    // Variable declaration and initialization
    int num1 = 5;
    int num2 = 10;

    // Output the initial values
    std::cout << "Before swapping: num1 = " << num1 << ", num2 = " << num2 << std::endl;

    // Call the swap function
    swap(num1, num2);

    // Output the swapped values
    std::cout << "After swapping: num1 = " << num1 << ", num2 = " << num2 << std::endl;

    return 0;
}

// Function definition
void swap(int& a, int& b) {
    // Swap the values using a temporary variable
    int temp = a;
    a = b;
    b = temp;
}