int i=4
int[] s =new int [1<
the ouput is 16
i don't know why?
what's the mathematical function?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Kirtan PatelRank #292 · 8.6K reputationPosted Dec 25, 2009, 10:09 AM EST
//00000100 Binary of 4
After Shift Left Operation ( i << 2) move each bit left by 2 and ( binary will be below which is Binary of 16)
//00010000 Binary of 16
so you got the length = 16
Hiren SoniRank #694 · 3.5K reputationPosted Dec 25, 2009, 3:27 PM EST