basiluobotou 发表于 2022-8-11 22:29:27

打卡

fishsnop 发表于 2022-8-11 22:40:59

参考答案

hellohuang 发表于 2022-8-11 22:54:07

滴滴打卡

山南水北5899 发表于 2022-8-11 23:07:30

111

IC阶层 发表于 2022-8-11 23:46:01

完成作业

九月璃陌 发表于 2022-8-12 00:06:44

已完成

暮木_ 发表于 2022-8-12 10:25:16

1.机器语言

2.编译

3.编译型语言效率高、灵活度高、可移值性高

4.

5.将源代码转化为中间代码,发送给解释器,

解释器逐句翻译给CPU执行

吃狗的汉堡 发表于 2022-8-12 10:27:45

从0开始

王家田 发表于 2022-8-12 11:21:21

鱼C有你更精彩^_^

清晨一缕阳光 发表于 2022-8-12 13:43:15


#include <>
#include <direct.h>
#include <stdio.h>
#include <stdlib.h>
#include <字符串>

#define 最大 256

长总计;

int countLines(const char *filename);
void findAllCodes(const char *path);
void findALLFiles(const char *path);

int countLines(const char *filename)
{
文件 *fp;
整型计数 = 0;
int temp;
      
if ((fp = fopen(filename, “r”)) == NULL)
      {
fprintf(stderr, “Can not open the file:%s\n”, filename);
返回 0;
      }
      
while ((temp = fgetc(fp)) != EOF)
      {
if (temp == '\n')
                {
计数++;
                }
      }
      
fclose(fp);
      
返回计数;
}

void findAllCodes(const char *path)
{
结构_finddata_t法;
长手柄;
char thePath, target;
      
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, “/*.c”), &fa)) != -1L)
      {

                {
sprintf(target, “%s/%s”, path, fa.name);
总计 += 计数线(目标);
}while (_findnext(handle, &fa) == 0);
      }
   
_findclose(手柄);
}

void findALLDirs(const char *path)
{
结构_finddata_t法;
长手柄;
char thePath;
      
strcpy(thePath, path);
if((handle = _findfirst(strcat(thePath, “/*”), &fa)) == -1L)
      {
fprintf(stderr, “path %s is error!\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()
{
字符路径 = “.”;
      
printf(“计算中...\n”);
      
findAllCodes(path);
findALLDirs(path);
      
printf(“目前你总共写了 %ld 行代码!\n\n”, total);
系统(“暂停”);
      
返回 0;
}

dyg1120 发表于 2022-8-12 13:57:51

看答案

王某人学c 发表于 2022-8-12 14:24:43

查看参考答案

Chen_ye 发表于 2022-8-12 14:50:05

0. 二进制
1.机器语言
2.编译
3.需不需要解释
4.不能
5.解释器可以跨平台使用
6.

气味好 发表于 2022-8-12 15:35:35

我要看答案

又笨又懒的小王 发表于 2022-8-12 17:58:32

看答案

秋石 发表于 2022-8-12 20:31:04

{:5_105:}

Txl55356186 发表于 2022-8-12 22:20:39


lllily 发表于 2022-8-12 22:45:47

0、因为计算机的大脑是CPU,CPU负责计算机大部分日常的计算功能,而CPU原理上只认识0和1。
1、CPU唯一认识的语言是最底层的开发语言,叫机器语言,也叫汇编语言。
2、编译。
3、对于CPU而言,编译型语言是将源代码先通过编译器编译为CPU认识的机器码,此后CPU随时都可以直接执行编译后的机器码;而解释型语言则不直接编译成机器码,而是将源码转换成中间代码,然后发送给解释器,再由解释器逐句翻译给CPU来执行。
4、不能,不同的操作系统可执行文件的格式不完全相同。
5、解释型编程语言为每一个操作系统专门定制一个解释器作为中转,因此解释器只需提供一个统一的入寇即可。
6、用特殊的符号代表具体的字母。

nyh233 发表于 2022-8-13 01:17:19

鱼C有你更精彩^_^

哇咔咔. 发表于 2022-8-13 15:35:26

{:5_103:}
页: 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 [1705] 1706 1707 1708 1709 1710 1711 1712 1713 1714
查看完整版本: S1E2:第一个程序 | 课后测试题及答案