c - Create a zero byte file in specific directory -
#include <stdio.h> #include <stdlib.h> int main() { file * fp; fp = fopen ("file.txt", "w+"); fclose(fp); return(0); }
the above programs create file . need file needs placed in specific directory. please help
add path parameter of fopen()
.
fp = fopen ("/path/to/file.txt", "w+");
Comments
Post a Comment