some queries for pointers and imputs
Code:
(1)
void exam(int &x){
}
//call the function
exam(x);
what is the meaning of this?
shouldn't be say
Code:
void exam(int *x){
}
//call the function
exam(&x);
(2)
if we call a function like this
Code:
(2)
void exam2(istream cin){
}
exam2(cin);
//call it
[/code]
cin use the iostream library but when we declare the function we use istream which
iostream inherit from it , what would be the different if we was declaring the function with iostream library
thanks