RicardoLHY 发表于 2019-6-28 17:01:21

查看答案

小十二 发表于 2019-6-28 17:51:59

回复

chenyingy 发表于 2019-6-28 21:46:46

ha

log骆 发表于 2019-6-28 23:00:05

       {:5_109:}

jdh0509 发表于 2019-6-28 23:02:44

0. 为什么我们说计算机其实是“二傻子”?
只懂0,1,
1. CPU 唯一认识的语言是什么语言?
机器语言
2. C 语言编写的源代码转换为汇编语言的过程叫什么?
编译
3. 编译型语言和解释型语言的本质区别是什么?
编译型语言可以直接编译成机器语言,解释型不能直接编译成机器语言
4. 在 Linux 系统上用 C 语言编译的可执行程序,是否能在 Windows 系统上执行?
不能,要重新编译后执行
5. 解释型编程语言是如何实现跨平台的?
通过字节码在不同的平台上用不同的解释器进行跨平台运行
6. 莫斯密码的原理其实是什么?
将原文进行编码,再将密码解码获得原文
7. 视频中小甲鱼“故弄玄虚”的那段密文还原后是什么内容(中文)?
Qin men(亲们)
Chen Di Ren Chi Fan Shi(趁敌人吃饭时)
Fa Dong Jin Gong( 发动进攻)

延7 发表于 2019-6-29 00:25:44

0.只识别二进制
1.机器码
2.编码
3.编码型是一次性把所有代码编译成计算机语言
解释型则按照需求来编译
4.不能
5.灵活性高,底层代码通用
6.查表
7.反正是鱼吹233333

澎湃羊 发表于 2019-6-29 14:15:20

本帖最后由 澎湃羊 于 2019-6-29 14:25 编辑

/*新鱼油抄代码通过啦!!!*/
#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("counting......\n");
       
        findAllCodes(path);
        findALLDirs(path);
       
        printf("you have done %ld codes!\n\n", total);
        system("pause");
       
        return 0;
}

内特熊猫 发表于 2019-6-29 14:24:23

查看参考答案。

让青春无悔 发表于 2019-6-29 14:53:16

I love FishC.com!

一把纸钱 发表于 2019-6-29 17:01:20

0.
1. 机器语言
2.编译
3.编译型语言将源代码翻译成机器语言(可执行文件)
解释型语言将源代码转换成中间代码,再发送给解释器,由解释器逐句翻译给CPU执行
4.可以
5.
6.查表
7.QINMEN CHEND IRENC HIFAN ADONG JINGO NG

likecxy 发表于 2019-6-29 23:47:58

报道

汤圆师兄 发表于 2019-6-30 01:21:52

看答案

luavr99 发表于 2019-6-30 09:51:09

计算代码行数

kj117 发表于 2019-6-30 11:06:34

0. 为什么我们说计算机其实是“二傻子”?
只能识别指定的语言与规则

1. CPU 唯一认识的语言是什么语言?
机器语言

2. C 语言编写的源代码转换为汇编语言的过程叫什么?
编译

3. 编译型语言和解释型语言的本质区别是什么?
编译型语言:一次编译后,直接多次执行
解释型语言:编译与执行同时进行,效率比编译型语言低

4. 在 Linux 系统上用 C 语言编译的可执行程序,是否能在 Windows 系统上执行?
可以,C语言是跨平台的语言

5. 解释型编程语言是如何实现跨平台的?
通过通用的解释器

6. 莫斯密码的原理其实是什么?
映射,事先定义好两种语言的对应关系

xcricky 发表于 2019-6-30 12:20:15

写完咯来看答案咯!!!!

望未来可期 发表于 2019-6-30 12:41:44

答案

算无遗策 发表于 2019-6-30 14:40:25

打得都快怀疑人生了

EM-Devil 发表于 2019-6-30 15:16:31

66

Kev1n4win 发表于 2019-6-30 15:19:36

机器语言

GODEND 发表于 2019-6-30 15:27:02

1只能识别01   2 机器码3编译4解释型语言要经过解释器翻译 额编译型语言先转化为汇编语言再转化为机器语言最好由cpu执行
5不能 6不知道 7 亲们趁敌人吃饭时发动进攻(别的学生解开的)
页: 312 313 314 315 316 317 318 319 320 321 [322] 323 324 325 326 327 328 329 330 331
查看完整版本: S1E2:第一个程序 | 课后测试题及答案