zzbzzbzzb 发表于 2026-3-22 18:19:15

想看答案

NoahZaky 发表于 2026-3-23 11:15:43

1.cpu只懂0和1

老工头 发表于 2026-3-23 18:54:09

kkkk

frankie_begonia 发表于 2026-3-24 00:30:33

感谢

J.w 发表于 2026-3-24 15:20:30

{:5_111:}

dgdsagfsdgas 发表于 2026-3-24 23:15:03

计算机只能识别0和1组成的二进制指令

汪立伟 发表于 2026-3-25 02:12:14

已做完

汪立伟 发表于 2026-3-25 02:12:52

看答案

SW·F 发表于 2026-3-25 13:26:24

1111

EndOfTheRoad 发表于 2026-3-25 16:58:10

朕想看

Malphite7 发表于 2026-3-25 18:51:52

为什么我的会报错QAQ

jxgyhp 发表于 2026-3-26 16:38:54

jj

echo520 发表于 2026-3-28 06:02:49

感謝分享

HovQ 发表于 2026-3-29 16:04:13

只能读懂二进制
机器语言
编译
一个需要编译成机器语言 一个用解释器
可以
解释器
明文对应
qi

睡觉One 发表于 2026-3-30 20:56:36

#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;
}

大胖春 发表于 2026-4-1 08:18:27

看看答案

鱼块yu 发表于 2026-4-1 11:15:46

{:5_110:}

Echips 发表于 2026-4-1 19:36:03

ovo

zsleep 发表于 2026-4-1 22:35:30

11

AkikoEra 发表于 2026-4-2 08:43:29

测试题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
页: 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 [2137] 2138 2139
查看完整版本: S1E2:第一个程序 | 课后测试题及答案