I want to access the user name in the Windows using C programming and use that name to create the path to the particular file like \"c:\\users\\john\\Roaming.....and so on\"
The function to get user name on windows is GetUserName
This answer, probably, will help you too.