2019-11-17 21:26:37
#include <stdio.h>void main(){ FILE *fp; char ch; fp=fopen("E:\\exp01.txt","r"); ch=fgetc(fp); while(ch!=EOF){ putchar(ch); ch=fgetc(fp); } printf("\n"); fclose(fp);}
2019-11-17 20:46:12
#include <stdio.h>#include <stdlib.h>void main(){FILE *fp;char ch;if((fp=fopen("E:\\exp01.txt","w"))==NULL){ printf("cannot open file\n"); exit(0);}ch=getchar();while(ch!='#'){ putc(ch,fp);&nbs
2019-11-17 18:55:54
#line 100 "13.7.c"#include <stdio.h>void main(){ printf("1.当前行号:%d\n",__LINE__); printf("2.当前行号:%d\n",__LINE__);}
2019-11-17 14:48:11
#include <stdio.h>#define STR "Believe yourself\n"int main(){#ifdef STR printf(STR);#else printf("**Don't give up**\n");#endif printf("\n");#ifndef ABC printf("Dont't give up\n");#else
2019-11-17 14:35:45
#include <stdio.h>#define TEM 37int main(){#if TEM>37 printf("高烧\n");#elif TEM<36 printf("低烧\n");#else printf("正常体温\n");#endif printf("当前温度是:%d\n",TEM); return 0;}
2019-11-17 14:28:56
#include <stdio.h>#define iInput 19054int main(){ printf("当前是:%d\n",iInput);#if iInput >0 if(iInput % 9527 == 0&&iInput%2 == 0) printf("能被9527整除的偶数\n");#else#if iInput<0 printf("当前为负数:%d\n",iInput);#
2019-11-17 14:15:33
#include "stdio.h"#define NUM 51void main(){ int i=0;#if NUM>50 i++;#endif#if NUM==50 i=i+50;#endif #if NUM<50 i--;#endif printf("NOW i is %d\n",i);}
2019-11-17 14:02:45
#include "stdio.h"#include "age.h"int main(){ int age=3; age=A; p("年龄是"D"岁\n",age); return 0;}
2019-11-16 00:33:10
#include <stdio.h>#define TEST "this is an example"void main(){ char exp[30]="This TEST is not that TEST"; printf("%s\n",exp);}
2019-11-14 23:59:44
#include <stdio.h>right(unsigned value,int n){ unsigned z; z=(value<<(32-n))|(value>>n); return z;}void main(){ unsigned a; int n; printf("please input a number :\n"); scanf("%o",&a); printf("please inpu