What will be the output of the following C++ code? [code] #include <stdio.h> #include <iostream> using namespace std;

Tam ca

New member
What will be the output of the following C++ code?
Code:
    #include <stdio.h>
    #include <iostream>
    using namespace std;
    int main()
    {
        int array[] = {10, 20, 30};
        cout << -2[array];
        return 0;
    }
A. -15
B. -30
C. compile time error
D. garbage value
 

Tìm kiếm

Back
Top