C语言编译器有哪些啊?

Python013

C语言编译器有哪些啊?,第1张

C语言编译器目前主要有VC++、dev-C++、C-Free、win-TC、TC 2.0等等。

其中比较经典的VC++,微软的产品,编译器,链接器,运行,调试等功能于一体的强大开发工具,特点是功能十分强大,对于新手来说需要一段时间去摸索。

dev-C++是windows下一款开发c/c++的开发环境,使用gcc为编译器,遵循标准,功能比较强大,语法高量,可以进行单步调试(这对排除错误很重要),进行断点设置等功能,遵循C标准,是一款很强大的开发工具。

C-Free是一款支持多种编译器的专业化C/C++集成开发环境(IDE)。利用C-Free,使用者可以轻松地编辑、编译、连接、运行、调试C/C++程序。

TC 2.0:Borland公司的产品,在dos界面下编译运行,小巧、灵活,但是不能使用鼠标。

win-TC:在tc2.0的基础上加上了界面,能够使用鼠标,具有语法高量,可以嵌入汇编等特点,对新手一些,拜托了不能用鼠标的困难。

编译器,简单讲,就是将“一种语言(通常为高级语言)”翻译为“另一种语言(通常为低级语言)”的程序。一个现代编译器的主要工作流程:源代码 (source code) → 预处理器 (preprocessor) → 编译器 (compiler) → 目标代码 (object code) → 链接器(Linker) → 可执行程序 (executables)。

我这里有一个!

具体的,稍微改一下就可以了!

#include "stdio.h" /*I/O函数*/

#include "stdlib.h" /*其它说明*/

#include "string.h" /*字符串函数*/

#include "conio.h" /*屏幕操作函数*/

#include "mem.h" /*内存操作函数*/

#include "ctype.h" /*字符操作函数*/

#include "alloc.h" /*动态地址分配函数*/

struct score

{

int mingci

char xuehao[8]

char mingzi[20]

float score[6]

}data,info[1000]

int i,j,k=0

char temp[20],ch

FILE *fp,*fp1

void shuru()

{

if((fp=fopen("s_score.txt","ab+"))==NULL)

{

printf("cannot open this file.\n")

getch()exit(0)

}

for(i=0i<=1000i++)

{

printf("\nPlease shuru xuehao:")

gets(data.xuehao)

printf("Please shuru mingzi:")

gets(data.mingzi)

printf("Please shuru yuwen score:")

gets(temp)data.score[0]=atof(temp)

printf("Please shuru shuxue score:")

gets(temp)data.score[1]=atof(temp)

printf("Please input yingyu score:")

gets(temp)data.score[2]=atof(temp)

printf("Please shuru wuli score:")

gets(temp)data.score[3]=atof(temp)

printf("Please shur huaxue score:")

gets(temp)data.score[4]=atof(temp)

data.score[5]=data.score[0]+data.score[1]+data.score[2]+data.score[3]+data.score[4]

fwrite(&data,sizeof(data),1,fp)

printf("another?y/n")

ch=getch()

if(ch=='n'||ch=='N')

break

} fclose(fp)

}

void xianshi()

{

float sint n

if((fp=fopen("s_score.txt","rb+"))==NULL)

{

printf("Cannot reading this file.\n")

exit(0)

}

for(i=0i<=1000i++)

{

if((fread(&info[i],sizeof(info[i]),1,fp))!=1)

break

}

printf("\nxuehao mingzi yuwen shuxue yingyu wuli huauxue zhongfen\n")

for(j=0,k=1j<ij++,k++)

{

info[j].mingci=k

printf("%6s %8s %3.1f %3.1f %3.1f %3.1f %3.1f %3.1f\n",info[j].xuehao,info[j].mingzi,info[j].score[0],info[j].score[1],info[j].score[2],info[j].score[3],info[j].score[4],

info[j].score[5])

}

getch()

fclose(fp)

}

void xiugai()

{

if((fp=fopen("s_score.txt","rb+"))==NULL||(fp1=fopen("temp.txt","wb+"))==NULL)

{

printf("Cannot open this file.\n")

exit(0)

}

printf("\nPLease shuru xiugai xuehao:")

scanf("%d",&i)getchar()

while((fread(&data,sizeof(data),1,fp))==1)

{

j=atoi(data.xuehao)

if(j==i)

{

printf("xuehao:%s\nmingzi:%s\n",data.xuehao,data.mingzi)

printf("Please shuru mingzi:")

gets(data.mingzi)

printf("Please shuru yuwen score:")

gets(temp)data.score[0]=atof(temp)

printf("Please shuru shuxue score:")

gets(temp)data.score[1]=atof(temp)

printf("Please input yingyu score:")

gets(temp)data.score[2]=atof(temp)

printf("Please input wuli score:")

gets(temp)data.score[3]=atof(temp)

printf("Please input huaxue score:")

gets(temp)data.score[4]=atof(temp)

data.score[5]=data.score[0]+data.score[1]+data.score[2]+data.score[3]+data.score[4]

} fwrite(&data,sizeof(data),1,fp1)

}

fseek(fp,0L,0)

fseek(fp1,0L,0)

while((fread(&data,sizeof(data),1,fp1))==1)

{

fwrite(&data,sizeof(data),1,fp)

}

fclose(fp)

fclose(fp1)

}

void chazhao()

{

if((fp=fopen("s_score.txt","rb"))==NULL)

{

printf("\nCannot open this file.\n")

exit(0)

}

printf("\nPLease shuru xuehao chakan:")

scanf("%d",&i)

while(fread(&data,sizeof(data),1,fp)==1)

{

j=atoi(data.xuehao)

if(i==j)

{

printf("xuehao:%s mingzi:%s\nyuwen:%f\n shuxue:%f\n yingyu:%f\n wuli:%f\n huaxue:%f\n ",data.xuehao,data.mingzi,data.score[0],data.score[1],data.score[2],data.score[3],data.score[4],data.score[5])

}getch()

}

}

void shanchu()

{

if((fp=fopen("s_score.txt","rb+"))==NULL||(fp1=fopen("temp.txt","wb+"))==NULL)

{

printf("\nopen score.txt was failed!")

getch()

exit(0)

}

printf("\nPlease input ID which you want to del:")

scanf("%d",&i)getchar()

while((fread(&data,sizeof(data),1,fp))==1)

{

j=atoi(data.xuehao)

if(j==i)

{

printf("Anykey will delet it.\n")

getch()

continue

}

fwrite(&data,sizeof(data),1,fp1)

}

fclose(fp)

fclose(fp1)

remove("s_score.txt")

rename("temp.txt","s_score.txt")

printf("Data delet was succesful!\n")

printf("Anykey will return to main.")

getch()

}

main()

{

while(1)

{

clrscr()/*清屏幕*/

gotoxy(1,1)/*移动光标*/

textcolor(YELLOW)/*设置文本显示颜色为黄色*/

textbackground(BLUE)/*设置背景颜色为蓝色*/

window(1,1,99,99)/* 制作显示菜单的窗口,大小根据菜单条数设计*/

clrscr()

printf("*************welcome to use student manage******************\n")

printf("*************************menu********************************\n")

printf("* ========================================================= * \n")

printf("* 1>shuru 2>xiugai * \n")

printf("* 3>shanchu 4>chazhao * \n")

printf("* 5>xianshi 6>exit * \n")

printf("* * \n")

printf("* --------------------------------------------------------- * \n")

printf(" Please input which you want(1-6):")

ch=getch()

switch(ch)

{

case '1':shuru()break

case '2':xiugai()break

case '3':shanchu()break

case '4':chazhao()break

case '5':xianshi()break

case '6':exit(0)

default: continue

}

}

}

1、现在 C语言建议使用Microsoft Visual Studio 编程软件比较好,应该该软件与电脑Windows 7,8,10等系统兼容性比较好。

2、Microsoft Visual Studio(简称VS)是美国微软公司的开发工具包系列产品。VS是一个基本完整的开发工具集,它包括了整个软件生命周期中所需要的大部分工具,如UML工具、代码管控工具、集成开发环境(IDE)等等。所写的目标代码适用于微软支持的所有平台,包括Microsoft Windows、Windows Mobile、Windows CE、.NET Framework、.NET Compact Framework和Microsoft Silverlight 及Windows Phone。

3、Visual Studio是目前最流行的Windows平台应用程序的集成开发环境。最新版本为 Visual Studio 2015 版本,基于.NET Framework 4.5.2 。