Oct 27 2022 Flashcards
1
Q
What is reference
A
Alias / Nick name for other variable
2
Q
How to reference
A
x = 10
&y = x
3
Q
How much memory is reference occupying
A
zero
4
Q
what is the syntax for pointer to a function
A
[return type] (*nameofpointer)(parameters);
fp = name of function;
Call By -> (*fp)();
5
Q
What does pointer to a function store
A
address of the function
6
Q
What can you not do in referencing that you can do in pointers
A
Change the initial value to something else
7
Q
what is function overloading
A
If More than one functions can have same name, but different parameter list (number and type ), then they are overloaded functions
Return the is not considered in overloading
Function overloading is used for achieving compile time polymorphism