Monday, July 4, 2022

CALL BY VALUE FUNCATION #THEHACKERS@

 #include<iostream>

using namespace std;


void swap(int a, int b)

{

    int temp;

    temp=a;

    a=b;

    b=temp;

    cout<<a<<" "<<b<<endl;

}

int main()

{

    int x=10,y=20;

    swap(x,y);

    cout<<x<<" "<<y<<endl;

}

No comments:

Post a Comment

CONSTRUCTURE IN PARENT CLASS

class Parent {     public Parent()     {         System.out.println("Parent Constrcutor");     }              } class Child extend...