this----> for (i=1;i <=5;printf ("%d",i)); prints i (which is 1) infinite times, because i++ is not executed.
If you see right of the last parenthesis of for loop is a ";" which stops there the execution . Thus i++ is never executed. It is outside of the for loop.
You can use the tags to include language specification instead of asking "anyone please explain".
Tags are used by search engine to find threads under similar topics by matching the search terms against thread tags. Use of irrelevant words in tags will lessen the searchability of the thread.