Message from C, C++ discussions

December 2019

— What u give the input and u expected from this programme


Input—> abc output—>cbabc So it should return 2 as it is inserting 'c' and 'b' at the beginning

— This will give you clarity

— Ok

— I think u cant write isPallindrome inside if statement

— Because u have defined isPallindrome()

— What do I do then??

— If returns 1 or 0 then it is ok

— But what about last else part in isPallindrome()

— If none of the above condition is getting satisfied then it is calling itself again by incrementing the start index by 1 and decrementing the last index by 1

Message permanent page

— Inside if u have to return a int value not a function

— It defines no meaning to this