What will be the output of the following C++ code? [code] #include <iostream> using namespace std; int func(void *Ptr);

Thảo Justin

New member
What will be the output of the following C++ code?
Code:
    #include <iostream>
    using namespace std;
    int func(void *Ptr);
    int main()
    {
        char *Str = "abcdefghij";
        func(Str);
        return 0;
    }
    int func(void *Ptr)
    {
        cout << Ptr;
        return 0;
    }
A. abcdefghij
B. address of string "abcdefghij"
C. compile time error
D. runtime error
 

Tìm kiếm

Back
Top