use fopen function to open a text file. there is no connection actually. in the function fopen the path of the file can be stated.