【发布时间】:2014-09-09 17:09:15
【问题描述】:
我有一个名为 output.txt 的文件,我想在其中打印一个根 (√) 符号。 这是我的程序
#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);
}
但是当我运行程序时 (û) 会打印在其中
【问题讨论】:
-
û是代码点\xfb的 unicode 字符。