计算机工作基于二进制,只能识别和接受1和0组成的指令
机器语言
编译
能否直接被CPU执行
由解释器翻译给CPU执行
查表
1
0:计算机主要是以cpu为主,cpu是计算机的大脑,用来识别’0‘和’1‘
1:cpu唯一识别的语言是机器语言也就机器码
2:编译型语言主要是将源代码通过编译器转换成机器码,cpu随时可以识别机器码;而解释型语言不直接编译成机器码而是将源代码转换成中间代码由解释器转给cpu执行
4:不能应为同一个可执行文件在不同操作系统的准备工作是不同的造成可执行文件的格式不同
5:设置一个统一的系统
6:摩斯密码使用特殊的符号来指代具体的字母
7:
0:因为计算机只认识0和1两个数;计算机反应快,但是没有自主的思维能力。
1:机械语言
2:编译过程
3:编译语言需要通过编译和链接形成可执行文件,而解释语言是通过解释编码器解码所得到。解释语言不可以链接成可执行文件。
4.不能
5。解释语言是依赖于不同平台的相应的解释编码器。
6.对照密码本进行翻译
7.i don‘t know
感谢分享
https://imgse.com/i/xoe90A
66666666666666666666666
哈哈
1
kan
hhhhhhhhhhh
a
1
{:5_109:}
#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("目前你总共写了 %1d 行代码! \n\n", total);
system("pause");
return 0;
}
,
2022.10.31打卡
s1e2
只能执行不能思考
机器语言
编译
都为了让机器为人类所用
编译型在写好代码后直接转换为机器语言,解释型在使用时转换
能
转换成机器语言
硬盘存储原理
learner 的密码:
root@learner-virtual-machine:/home/learner/学c# ./callline
计算中...
目前你总共写了 112 行代码!
RE: S1E2:第一个程序 | 课后测试题及答案
6