+ 2

There several confusing questionss which will make you blow in challenges, how many of you had come across these kind of questn?

int a[5]; for (i=0; i<5;i++) { cout<<i[a]; } but the output "01234 " was correct😂😂

23rd May 2017, 4:03 AM
U L Knw Me soon😉😋
U L Knw Me soon😉😋 - avatar
6 Answers
+ 7
In case you don't know, a[i] = *(a + i) = *(i + a) = i[a] So, output will be "01234" only.
23rd May 2017, 1:04 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 3
imagine find the bug in thowsands lines of this kind of code...
23rd May 2017, 4:30 AM
Anibal Lopes
+ 2
@Setiwan Next actually i too came across that question i had choosen all the options except 100 😂😂 (25, 26,99) my next try was supposed to be 100😜😋
23rd May 2017, 4:18 AM
U L Knw Me soon😉😋
U L Knw Me soon😉😋 - avatar
+ 2
@Anibal Lopes if i had been that much talented then i would been a chief developer in google right now ..lol.😂😂😜
23rd May 2017, 4:55 AM
U L Knw Me soon😉😋
U L Knw Me soon😉😋 - avatar
+ 2
in a lot of challenges the code is not usefull to the real world and the objetive is only trick your mind. ok it is a game but I think that situation gives nothing to learning the language.
23rd May 2017, 4:47 PM
Anibal Lopes
+ 1
i came across this question in challenge : #include <iostream> #include <cstring> using namespace std; int main() { int i=1; for(;i<100;i++){ if(i>5){ continue; i*=i; } } cout<<i; } // the answer is 100 it blow my mind. need 20 minutes in code playground to understand it.
23rd May 2017, 4:11 AM
Setiawan Next
Setiawan Next - avatar