#include<iostream.h> #include<conio.h> #include<process.h> void main() { clrscr(); void funA(int s); void funB(int &); void funC(int *); int s=4; funA(s); cout<<"s="<<s; funB(s); cout<<"s="<<s; funC(&s); cout<<"s="<<s; getch(); } void funA(int i) { i++; } void funB(int &k) { k++; } void funC(int *j) { ++*j; }
Sunday, 7 December 2014
C++ program to perform function based operations such as pass by value, pass by reference and pointer passing
Posted by Madan
Posted on 14:08