I am using fgets to read line by line from file.
There are some special characters in the file like degrees and micro symbols.
After reading using fgets am trying to print it in terminal but am getting junk character before these symbol where ever it comes.
What is the reason for this .. How can i overcome this...
C doesn't understand things like Unicode/UTF-8/etc or terminal code pages, etc.
Save a file in Notepad with special characters and it will not print out the same to the console (unless you take special care to set up the console first).
Unfortunately, the console simply isn't designed to handle Unicode... so your application must do some special work to display the characters you want.
Can you give us a little more information on what exactly you are trying to do?