I want to write it with c language....I was thinking of opening the file in append mode and run a loop with counter with every '{' opening braces...the loop will give '\t' (tab) for every opening brace and in the next opening brace the counter will increase i.e there will be 2 tabs like this.....is the idea correct? or will I have to do by a different method? i will do the program in devc++ IDE.