想看答案
1.cpu只懂0和1
kkkk
感谢
{:5_111:}
计算机只能识别0和1组成的二进制指令
已做完
看答案
1111
朕想看
为什么我的会报错QAQ
jj
感謝分享
只能读懂二进制
机器语言
编译
一个需要编译成机器语言 一个用解释器
可以
解释器
明文对应
qi
#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 findALLDirs(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;
}
看看答案
{:5_110:}
ovo
11
测试题0:因为计算机使用二进制,它只懂得二进制的0和1。
1:cpu只认识二进制的0和1,是机器语言。
2:叫做编译,引入大量的助记符,由汇编语言将助记符转化为机器语言来让cpu识别。
3:编译型语言转化为汇编语言最后转化为机器语言,然后让cpu来执行。所以编译型语言是直接以机器语言输入到cpu,不需要经过解释器翻译给cpu,所以实现了跨平台。
4:部分情况下可以执行
5:解释性语言通过解释器将语言转化为中间代码并翻译给cpu这样不同平台只要有解释器就可以了。
6:查表,将莫斯密码对着莫斯密码编译表解谜成明文,就是解码的过程。
7:亲们趁敌人吃饭时发动进攻
https://cdn.phototourl.com/free/2026-04-02-364a561d-afb0-47bd-9270-2e46d40319fb.png