Functions
Functions
// int main()
// {
// cout<<Max(10,5)<<endl;
// cout<<Max(12.5f,17.3f);
// return 0;
// }
// int main()
// {
// cout<<add(8, 10)<<endl; //third argument is set
to zero
// cout<<add(8, 10, 10)<<endl; //third argument is set to
10
// return 0;
// }
1
// ##2 PASS BY VALUE
2
// cout<<x<<" "<<y;
// }
// }
// int g=6969;
// void fun()
// {
// int g = 10;
// {
// int g = 0;
// g++;
// cout<<g<<endl;
3
// }
// cout<<g<<endl;
// cout<<::g<<endl;
// }
// int main()
// {
// cout<<g<<endl;
// fun();
// cout<<g<<endl;
// }
// void display()
// {
// cout<<"Hello"<<endl;
// }
// int main()
// {
// void (*fptr)(); //declaration
// fptr = display; //initialisation
// (*fptr)(); //calling
// return 0;
// }
// fp = min;
// cout<<(*fp)(10, 5); //min function is called
// return 0;
// }
4
// int fun()
// {
// static int x=10;
// return ++x;
// }
// int main()
// {
// cout<<fun()+fun(); // 11 + 12 = 23
// }