我有一個名爲的文件output.txt並且我想在其中打印一個根(√)符號。 這裏是我的程序如何在一個文件中打印帶有c的根符號
#include<stdio.h>
#include<conio.h>
void main(void)
{
FILE *fptr;
fptr = fopen("output.txt","w+"); //open the file to write
fprintf(fptr,"\xfb"); // \xfb is the hexadecimal code for root symbol
fclose(fptr);
}
但是當我運行程序(U)被印在它
'û'是Unicode字符碼點' \ xfb'。 –