张鱼小丸子h 发表于 2026-3-13 16:24:53

0:因为我们计算机只能识别二进制指令
1:机器语言
2:编译
3:编译型语言需要通过编译器将源代码编译成目标平台的可执行文件,之后运行时就不需要在编译;而解释型语言不需要提前编译,直接通过解释器逐行解释源代码并执行
4:不能
5:解释器
6:用不同长度的点和线组成不一样的顺序和长短来表示字母、数字和符号的编码方式

youlibb 发表于 2026-3-14 12:50:17

#include<stdio.h>

int main()
{
    printf("Hello World!\n");
    return 0;

}

容容容 发表于 2026-3-14 14:20:29

1.机器语言 它有二进制的0和1组成
2.编译 具体是编译过程中的编译前端阶段 会将C语言源代码转换为汇编代码
3.是否在运行前生成目标平台的机器码
4.不能 这俩的操作系统内核 文件格式 系统调用接口都不同 编译生成的可执行程序以来对应的系统环境 无法直接跨系统运行
5.中间层
6.用不同长度的电信号点划间隔来表示字母数字和符号
7.小甲鱼带你学c带你飞

虾芋 发表于 2026-3-15 15:18:26

幸苦了

mjc_111 发表于 2026-3-15 21:19:20

hello

跳进海里多余 发表于 2026-3-15 23:21:49

coming123 发表于 2026-3-16 10:20:50

{:10_327:}

Asari23 发表于 2026-3-16 17:04:14

111

Eden_3480 发表于 2026-3-16 23:28:03

 不,我坚决不同意楼主的看法!

WCX109070 发表于 2026-3-17 00:07:49

n

BoluoK1NG 发表于 2026-3-17 20:31:35

111

秋叶枫 发表于 2026-3-19 00:48:34

{:13_443:}

1943594504 发表于 2026-3-19 15:58:07

1

向莹露 发表于 2026-3-20 17:01:36

"C:\Users\23813\Pictures\Screenshots\屏幕截图 2026-03-20 170014.png"

Car0ta 发表于 2026-3-21 20:34:13


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

hardingwork 发表于 2026-3-22 11:19:02

真的打完代码了

沂淮a 发表于 2026-3-22 11:57:02

{:10_284:}

markleah 发表于 2026-3-22 16:14:28

CPU 唯一真正认识、能直接执行的语言:机器语言(二进制代码)

mikasa9998 发表于 2026-3-22 16:49:41

.

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

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