Capgemini Engineering interview question

difference b/w for and while loop? can we run a program without main()? recursion? program on strings: 1. check if the string is palindrome or not? 2. replace your last name with the word given by them.etc.,