0
1["abc"]
Could anyone tells me what's the name of this code style in C++
5 Answers
+ 2
I guess this is one of the challenge question...
if I am not mistaken, it is like below:
this is used with cout and output expected is b...
now, let me try to explain this output... "abc" is string, which inturn as array of character... now, recall array as pointer.... so, here we are trying to get second element of array "abc" ...HIH
+ 3
Dark Angel A challenge question says "What does it output cout<<1["abc"]"
+ 2
I need more details so that I can help you.
+ 1
Ketan Lalcheta I gave a right answer in that question. But I hadn't seen it before
0
x[i] is the same as *(x + i), so you are just interchanging the x with the i. note that x must be a pointer(which a number implicitly is)



