Search your topic here

Call by reference in C++

PRINCIPLES OF PROGRAMMING LANGUAGES
PRACT. Write a program in C++ to implement call by reference parameter passing Method.

#include <iostream>
using namespace std;

void show(int *x)
{
    cout<<*x<<endl;
}
int main()
{
    int age = 20;
    show(&age);
    
    return 0;
}

LEAVE A REPLY










Related topics

Please use contact page in this website if you find anything incorrect or you want to share more information about the topic discussed above.