《C程序设计语言》读书笔记20091106
书中有几个问题有点模糊。记录一下。
Answer to Exercise 1-7
Write a program to print the value of EOF .
#include <stdio.h>
int main(void)
{
printf("The value of EOF is %d\n\n", EOF);
return 0;
}
EOF在stdio.h中的定义为#define EOF (-1)
其中()被忽略,只使用-1。
相关文档:
源码:
# include <stdio.h>
int main()
{
/* 换行符'\n',用于输出换行 */
printf("How are you?\n");
printf("I am fine.\n\n");
/* 横向跳格符'\t',使跳到下一个输出区 */
  ......
源码:
# include <stdio.h>
int main()
{
int i, j, k;
int m, n, p;
i = 8;
j = 10;
k = 12;
/* 自增在操作数之前 */
  ......
源码:
# include <stdio.h>
int main()
{
/* 定义了一个无符号字符型变量,此变量只能用来存储无符号数 */
unsigned char result;
int a, b, c, d;
a = 2;
b = 4; ......
源码:
# include <math.h>
# include <stdio.h> /* 数学函数库 */
int main()
{
/* 用s表示多项式的值,用t表示每一项的值 */
double s, t, x; // 此处用双精度声明变量
int n;
printf ......
C Sharp(C#)中如何删除文件(文件夹)
直接删除:
using System.IO;
...
string filePath = @"D:\...\xxx.xxx";
if (File.Exists(filePath))
{
File.Delete(filePath);
}
else
{
Console. ......