Aakash Rao Profile picture
building things on the web โ€ข 2nd year ug - Robotics & AI

Feb 25, 2022, 8 tweets

Let's review this question & try to understand what's the logic behind it....

Let's go.......... ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ

๐Ÿงตโ†“

Before jumping onto the answer, Let's understand what is "Increment" Operator (++)

The increment operator (++) increments (adds one to) its operand and returns a value.

Let's try to understand with an example โ†“

{1/6}

Now you know ++ operator, Let's understand what is "Postfix" & "Prefix" Increment.

โ€ข Prefix Increment (++a) - It (adds one to) its operand and "then" returns a value.

Let's see a quick example โ†“

{2/6}

Now you know what is Prefix, Let's see the what is Postfix Increment.

โ€ข Postfix Increment (a++) - It return the value first & then (adds one to) its operand.

Let's see a quick example โ†“

{3/6}

Let's see a quick difference between both of them โ†“

โ€ข Prefix: adds up & then return the value.

โ€ข Postfix: returns first & then adds up the value.

{4/6}

Let's now see our solution to the problem:-

=> Answer was 26

Let's see how {Part-1} โ†“

{5/6}

Problem Solution {Part-2} โ†“

{6/6}

That's it for this thread. Hope you liked it. ๐Ÿ™Œ๐Ÿผ

- Hii I'm Aakash. ๐Ÿ‘‹๐Ÿฝ
- Sharing my journey and learnings. ๐Ÿš€

If you liked it, then you can follow me, @Aakash_Codes for more such content & resources.

Thanks for the support.๐Ÿ˜Š

Back to top:-

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling