shi5486993 发表于 2022-4-2 22:06:46

0

flashlry 发表于 2022-4-2 22:31:58

'/' '\'

moyukuan 发表于 2022-4-2 22:45:13

huifu

aL要努力 发表于 2022-4-2 23:20:56

0、因为计算机识别不了我们的语言
1、CPU唯一认识的语言是及机器语言
2、预处理
3、编译型语言可以直接生成可执行化程序,但是解释型语言需要一个解释器去解释其次才能生成可执行画爱程序
4、也许有些代码会存在些许的差别,所以大概率不能直接运行
5、解释型语言中的解释器会在不同平台将其代码转换成该平台的模式
6、解密

kido-- 发表于 2022-4-3 00:15:39

qaq

sehrrehs 发表于 2022-4-3 02:06:33

谢谢分享

ctj1997 发表于 2022-4-3 09:17:43

11

smcdabao 发表于 2022-4-3 10:35:34

fighting

KristenLove 发表于 2022-4-3 11:13:01

0.计算机只懂得0和1,本质逻辑是灯泡的开关。
1.机器语言。
2.编译。
3.人能否读懂。
4.不能。
5.不知道。
6.符号学,类似ascii,人为给出定义。
7.不知道。

柳苗鑫 发表于 2022-4-3 11:18:31

{:5_109:}

漠离Xakmmmk 发表于 2022-4-3 12:00:37


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

开开卡丁车 发表于 2022-4-3 12:13:38

写完啦

依硕 发表于 2022-4-3 12:52:37

二进制的原因吗
机器语言
编译
解释型语言效率没有编译语言快
可以
将源码转换成中间代码,然后发送给解释器,由解释器逐句翻译给 CPU 来执行。
查表
QINMENCHENDIAEENCHIFANSHIFADONGJINGONG

201011231 发表于 2022-4-3 13:07:32

路过点赞

晓风飞雨 发表于 2022-4-3 13:50:15

0、计算机智能识别二进制
1、机器码
2、编译
3、编译型语言直接编译为机器码,解释型语言生成中间码,把中间码发送给解释器,解释器再转换成机器码
4、可以
5、不同平台使用不同解释器
6、查表
7、亲们趁敌人吃饭时发动进攻

dl425879 发表于 2022-4-3 14:00:57

{:5_90:}

Yinty 发表于 2022-4-3 14:10:58

{:5_95:}

NaAugust 发表于 2022-4-3 14:12:54

本帖最后由 NaAugust 于 2022-4-3 14:18 编辑

0.只懂得二进制的0和1
1.机器语言
2.编译
3.编译语言:源代码最终编译成机器代码
解释性代码:不直接编译成机器语言,将源代码转换为中间代码发送给解释器,由解释器翻译给CPU执行
4.可以
5.源代码不修改或稍加修改,即可实现跨平台
6.对着编文解码
7.亲们趁敌人吃饭时发动进攻

林夕~ 发表于 2022-4-3 14:53:26

答案

阳春四月 发表于 2022-4-3 15:13:04

0.计算机听不懂人话
1.机器语言
2.编译
3.有没有编译成机器语言
4.能
5.解释器
6.二进制
7.不知道
页: 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 [1608] 1609 1610 1611 1612 1613 1614 1615 1616 1617
查看完整版本: S1E2:第一个程序 | 课后测试题及答案