Gamechanger 发表于 2020-6-22 09:51:37

emmmmm

Passioncream 发表于 2020-6-22 09:58:25

做完嘞

冰熊猫 发表于 2020-6-22 10:33:01

1111111111111111111111111111

k6k6l62008 发表于 2020-6-22 13:16:37

我要看答案

九墨 发表于 2020-6-22 14:10:11

本帖最后由 九墨 于 2020-6-22 14:11 编辑


0.只能识别01
1.二进制
2.编译
3.能否跨平台
4.不行
5.将源代码编译成中间代码再通过解释器翻译
6.查指令表
7.亲们趁敌人吃饭时发动进攻

ECSP 发表于 2020-6-22 14:42:57

111

lenxi 发表于 2020-6-22 15:07:17

1

lingyifu 发表于 2020-6-22 15:08:22

计算机算的快,但并不聪明

肥飞 发表于 2020-6-22 15:10:06

1

七七酱 发表于 2020-6-22 15:10:31

1.01
2.机器语言
3.编译

1185968678 发表于 2020-6-22 15:33:30

1

wk1977729 发表于 2020-6-22 16:51:19

ffff

Luner 发表于 2020-6-22 17:53:25

回复可见

llxjh 发表于 2020-6-22 18:40:31


Twilight6 发表于 2020-6-22 18:56:22

测试题:
0.因为
1.机器语言
2.编译
3.编译型语言 -> 汇编语言 -> 机器语言 -> CUP执行
解释型语言 -> 解释器 -> CPU执行每次都需要通过解释器解释才能让 CPU 读懂
4.可以的,跨语言
5.
6.就是将密码拿去和对照表进行一个个对照


动动手:
#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;
}

白菜白菜 发表于 2020-6-22 21:13:39

打卡第一天

一个学c的渣渣 发表于 2020-6-22 22:42:25

一直学一直爽

老汤有点不解啊 发表于 2020-6-23 10:47:03

0: 因为计算机只能读懂二进制,bit
1:机器语言
2:编译
3:编译型语言不需要解析器,而解析型语言需要
4:可以
5:由解析器传到cpu执行
6: 对号入座,按照符号找到相对应的单词数字
7:

xuzhengwei 发表于 2020-6-23 11:02:53

w

Fe2O3 发表于 2020-6-23 11:51:58

让我康康答案
页: 733 734 735 736 737 738 739 740 741 742 [743] 744 745 746 747 748 749 750 751 752
查看完整版本: S1E2:第一个程序 | 课后测试题及答案