0.因为计算机并不能理解我们的语言,只有我们将操作转换为二进制他才能理解。
1.机器语言
2.编译
3.区别为不直接编译成机器码,解释型语言会编译成中间代码。
4.不能
5.通过解释器来进行再次翻译
6.查表对字
7.qinmenchend
参考答案
代码行数出不来,0条代码
测试题:
0,只读的懂0和1
1,二进制语言机器语言
2,编译
3,编译型语言可直接被执行,而解释型语言要解释器翻译
4,稍加修改后可以
5,通过中间代码实现跨平台的
6,翻译
7,QINMENCHENDIRENCHIFANSHIFADONGJINGONG 亲们趁敌人吃饭时发动进攻
动动手:
1
111
1
1
为什么统计代码行数的程序一直显示为0{:10_266:}
1
感谢
1
鱼C有你更精彩^_^
1
0,只认识0和1
1,机器语言
2,编译
3,编译型语言机器可以直接识别,解释型语言需要靠解释器
4,不能
5,解释器
6,查表
6666666666666666
666
查看答案
本帖最后由 Suicee 于 2023-7-30 16:27 编辑
0.因为计算机只认识0和1,以及其组成的指令
1.第一代机器语言
2.编译
3.编译型语言编译好了可以直接在cpu上运行,而解释性是翻译一句句执行
4.可以,c语言具有移植性
5.使用不通过的解释器来跨平台的
6.字母对应莫斯电码
7.转换出来是拼音()
#include <io.h>
#include <direct.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 256
long total;
int countLines(const char *filename);
void findAllCodes(const char *path);
void findALLFiles(const char *path);
int countLines(const char *filename)
{
FILE *fp;
int count = 0;
int temp;
if ((fp = fopen(filename, "r")) == NULL)
{
fprintf(stderr, "Can not open the file:%s\n", filename);
return 0;
}
while ((temp = fgetc(fp)) != EOF)
{
if (temp == '\n')
{
count++;
}
}
fclose(fp);
return count;
}
void findAllCodes(const char *path)
{
struct _finddata_t fa;
long handle;
char thePath, target;
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, "/*.c"), &fa)) != -1L)
{
do
{
sprintf(target, "%s/%s", path, fa.name);
total += countLines(target);
}while (_findnext(handle, &fa) == 0);
}
_findclose(handle);
}
void findALLDirs(const char *path)
{
struct _finddata_t fa;
long handle;
char thePath;
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, "/*"), &fa)) == -1L)
{
fprintf(stderr, "The path %s is wrong!\n",path);
return;
}
do
{
if (!strcmp(fa.name, ".") || !strcmp(fa.name, ".."))
continue;
if( fa.attrib == _A_SUBDIR)
{
sprintf(thePath, "%s/%s", path, fa.name);
findAllCodes(thePath);
findALLDirs(thePath);
}
}while (_findnext(handle, &fa) == 0);
_findclose(handle);
}
int main()
{
char path = ".";
printf("计算中...\n");
findAllCodes(path);
findALLDirs(path);
printf("目前你总共写了 %ld 行代码!\n\n", total);
system("pause");
return 0;
}