Jan 21 in C Plus Plus
Q: What is the output of the given program?

#include < stdio.h >  

using namespace std;  

int main()  

{  

int array[] = {10, 20, 30};  

cout << -2[array];  

return 0;  

}  

a) -15

b) -30

c) Compiler error

d) Garbage value

1 Answer

+1 vote
Jan 21

b) -30

Related questions

+1 vote
Jan 20 in C Plus Plus
+1 vote
Jan 21 in C Plus Plus
...