我有这段代码:
int main(int argc, char *argv[]){
FILE *lol = fopen("/some_folder/lol", "rt");
我想知道文件“lol”的内容将存储在内存中的哪个位置。
谢谢
最佳答案
当您打开文件时 - 它不会加载文件,它实际上打开文件的句柄 - 供引用。打开后,您可以使用 fread 命令读取文件。
这个问题的答案在这里 -
When is the file loaded into memory - for fread, fopen and fwrite calls?
关于c - 使用 fopen() 打开的文本文件的内容是否会在堆栈中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37256525/