查看参考答案
一直报错,找不出拿错了
找不到对应文件,显示0行
本帖最后由 花小魚 于 2022-7-5 16:13 编辑
0. CPU只懂0和1
1. 机器语言
2. 编译
3. 是否直接编译为机器语言
4. 不能
5. 通过解释器
6. 查表
7. 亲们趁敌人吃饭时发动进攻
滴
已完成
66666666666
1
1
康康做的对不对{:5_102:}
0.计算机只认识0和1
1.机器语言
2.编译
3.编译型语言需要经过编译;解释型语言无需经过编译,跨平台性强.
4.可以 linux上使用gcc指令 window上可使用vscode devc++编译器
5. 通过解释器
6.摩斯密码表
7.亲们趁敌人吃饭时发起进攻
111
{:5_102:}
因为计算机只能识别二进制的机器码
机器码 机器的语言
编译
编译型语言可以通过编译器直接转换到机器的语言 二解释型语言则利用解释器一句一句地解释为机器的语言 效率低
可
通过解释器一句一句的翻译
利用编译表将点横组合翻译为铭文
亲们,趁敌人吃饭时发动进攻
零蛋w 发表于 2022-7-6 01:07
因为计算机只能识别二进制的机器码
机器码 机器的语言
编译
好吧 不可Orz
图一时之快先看答案
109
#include <>
#include <direct.h>
#include <stdio.h>
#include <stdlib.h>
#include <字符串>
#define 最大 256
长总计;
int countLines(const char *filename);
void findAllCodes(const char *path);
void findALLFiles(const char *path);
int countLines(const char *filename)
{
文件 *fp;
整型计数 = 0;
int temp;
if ((fp = fopen(filename, “r”)) == NULL)
{
fprintf(stderr, “Can not open the file:%s\n”, filename);
返回 0;
}
while ((temp = fgetc(fp)) != EOF)
{
if (temp == '\n')
{
计数++;
}
}
fclose(fp);
返回计数;
}
void findAllCodes(const char *path)
{
结构_finddata_t法;
长手柄;
char thePath, target;
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, “/*.c”), &fa)) != -1L)
{
做
{
sprintf(target, “%s/%s”, path, fa.name);
总计 += 计数线(目标);
}while (_findnext(handle, &fa) == 0);
}
_findclose(手柄);
}
void findALLDirs(const char *path)
{
结构_finddata_t法;
长手柄;
char thePath;
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, “/*”), &fa)) == -1L)
{
fprintf(stderr, “path %s is error!\n”,path);
返回;
}
做
{
if (!strcmp(fa.name, “.”) || !strcmp(fa.name, “..”))
继续;
if( fa.attrib == _A_SUBDIR)
{
sprintf(thePath, “%s/%s”, path, fa.name);
findAllCodes(thePath);
findALLDirs(thePath);
}
}while (_findnext(handle, &fa) == 0);
_findclose(手柄);
}
int main()
{
字符路径 = “.”;
printf(“计算中...\n”);
findAllCodes(path);
findALLDirs(path);
printf(“目前你总共写了 %ld 行代码!\n\n”, total);
系统(“暂停”);
返回 0;
}
是啥