#include <stdio.h> int main() { FILE* tp; tp=fopen("C:\\user\\object\\test.txt","r"); (tp==NULL)?printf("打开失败!\n"):printf("打开成功!\n"); fclose(tp); return 0; }