0
Output of A code with explanation
What is the output of this program? #include < stdio.h > using namespace std; int main(){ int array[] = {10, 20, 30}; cout << -2[array]; return 0;} a)-20 b)-30 c) garbage value
3 Answers
+ 2
-2[array]
=-array[2]
=-30
+ 2
welcome brother#)
just to ensure...
a genral approach..
n[array_name]
= (sign of n)array_name[ |n| ]
+ 1
thanksss alottttt