fdy123 发表于 2023-1-3 10:22:42

#include<stdio.h>
int main()
{
        printf("hello world !\n ");

        return 0;
}

啦啦啦21 发表于 2023-1-3 15:27:19

dd

ADBC123456 发表于 2023-1-3 15:48:22

1

耐久 发表于 2023-1-3 16:13:59

1

brockkk 发表于 2023-1-3 16:19:13

完事啦

香香香香菜 发表于 2023-1-3 16:31:03

0.只能识别机器码(0和1)
1.机器码
2.编译
3.更加繁琐,需要进一步翻译
4.可以
5.编译成exe的可执行文件是可以运行的
6.转换语言
7.亲们,趁敌人吃饭的时候,发起进攻。

KDUCK 发表于 2023-1-3 16:39:23

6

新手小陈陈 发表于 2023-1-3 16:49:12

0,计算机只能懂得01
1,机器码
2,编码
3,一个面对过程一个面对对象
4,不可以
5,
6,编译
7,

wanfenglin 发表于 2023-1-3 18:19:23

我写完啦,来看答案

gjy2233 发表于 2023-1-3 19:13:40

llll1

无敌小白wd 发表于 2023-1-3 19:25:52

hbjkjkjknjknjkk

Benny7268 发表于 2023-1-3 19:39:34

让我看答案

forgetbig 发表于 2023-1-3 19:58:01

答案

yukari123 发表于 2023-1-3 19:59:23

{:5_109:}

13395332372 发表于 2023-1-3 20:46:55

1

一头大熊猫 发表于 2023-1-3 21:03:15

hah

zigzagbug 发表于 2023-1-3 21:24:52

Learn¡

A_ZENG 发表于 2023-1-4 09:59: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 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;
}

vcpw 发表于 2023-1-4 10:15:34

0.因为计算机只懂得二进制的0和1
1.机器语言
2.编译
3.是否要翻译成汇编语言与机械语言
4.不可以
5.解释型编程语言不直接编译为机器语言,而是转化为中间代码再发送到解释器,由解释器翻译给CPU
6.对照莫斯密码表翻译
7.亲们趁敌人吃饭时发动进攻

forever_z 发表于 2023-1-4 10:23:52

1
页: 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 [1825] 1826 1827 1828 1829 1830 1831 1832 1833 1834
查看完整版本: S1E2:第一个程序 | 课后测试题及答案