Program of call by value and call by referecne

#include<iostream>
using namespace std;
//call by reference
void swap1(int *a, int *b)
{
    int temp;
    temp=*a;
    *a=*b;
    *b=temp;

    cout<<"\nInside swap1()";
    cout<<"\na="<<*a<<" b="<<*b;
}

//call by value
void swap(int a, int b)
{
    int temp;
    temp=a;
    a=b;
    b=temp;

    cout<<"\nInside swap()";
    cout<<"\na="<<a<<" b="<<b;
}

main()
{
    int a=10,b=20;

    //Call by value
    cout<<"\nBefore swap()";
    cout<<"\na="<<a<<" b="<<b;
    swap(a,b);
    cout<<"\nInside main()";
    cout<<"\na="<<a<<" b="<<b;

    cout<<"\nBefore swap1()";
    cout<<"\na="<<a<<" b="<<b;
    //Call by reference
    swap1(&a,&b);
    cout<<"\nInside main()";
    cout<<"\na="<<a<<" b="<<b;
   

}

Explain the function of if .... else in C programming.

if... else:
It is a conditional or branching statement which helps to jump from one part of a program to another part with the help of the decision condition given.