-
What is the output of this program?
#include
using namespace std;
int fun(void *P);
int main()
{
char *S = "Interview Mania";
fun(S);
return 0;
}
int fun(void *P)
{
cout << P;
return 0;
}
-
- Address of sting "Interview Mania"
- Compilation Error
- Runtime Error
- Garbage Value
- Interview Mania
Correct Option: A
Even though it is a void pointer, we gets the address.