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

Huyền Thu

New member
What will be the output of the following C++ code?
Code:
    #include <iostream>
    using namespace std;
    int main()
    {
        char *ptr;
        char Str[] = "abcdefg";
        ptr = Str;
        ptr += 5;
        cout << ptr;
        return 0;
    }
A. fg
B. cdef
C. defg
D. abcd
 

Tìm kiếm

Back
Top