jjh220012 发表于 2022-12-11 03:02:24

问答题答案:
66666


动动手答案:


Ghx456798 发表于 2022-12-11 10:08:10

只能识别二进制0和1
机器语言
编译

通过编译器
不知道



动动手答案:

#include<stdio.h>
#include<unistd.h>
#include<dirent.h>
#include<string.h>
#include<stdlib.h>
#include<sys/stat.h>

#define MAX         256

long total;

int countLines(const char *filename);
int isCode(const char *filename);
void findAllDirs(const char *path);

yio. 发表于 2022-12-11 14:22:40

问答题答案:测试题答案



动动手答案:


Joeytribbani 发表于 2022-12-11 16:27:07

问答题答案:

回复

动动手答案:


陈总. 发表于 2022-12-11 20:05:08

问答题答案:



动动手答案:


jzbest 发表于 2022-12-11 21:05:41

{:5_90:}问答题答案:



动动手答案:


3144815045 发表于 2022-12-11 23:32:22

问答题答案:



动动手答案:


BourneZhao 发表于 2022-12-11 23:54:44

问答题答案:

只认识二进制语言

动动手答案:


小小明. 发表于 2022-12-12 00:01:42

问答题答案:
查看参考答案


动动手答案:
查看参考答案

好上加好 发表于 2022-12-12 12:35:04

问答题答案:
0.因为计算机只能识别0和1
1.机器语言
2.编译
3.编译型语言在执行之前要经过编译器将源码执行成CPU可识别的机器码文件,解释型语言则是由解释器一行一行解释并执行
4.不可以
5.用虚拟机进行跨平台
6.数字对应单词
7.qinmenchndirenchifanshifadongjingong
动动手答案:

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


相约樱花树下 发表于 2022-12-12 17:03:14

问答题答案:



动动手答案:

查看答案

zjswcx 发表于 2022-12-12 17:40:00

问答题答案:



动动手答案:

#include<io.h>
#include<直接.h>
#include<stdio.h>
#include<stdlib.h>
#include<字符串.h>

#define 最大 256

长总计;

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

int countLines(const char *Filename)
{
    文件 *fp;
    整数计数=0;
    整数温度;

    if((fp=fopen(文件名,"r"))=NULL)
    {
      fprintf(stderr,"无法打开文件:%s\n",文件名);
      返回0;
    }
    而((temp=fgetc(fp))!=EOF)
    {
      if(temp=='\n')
      {
            计数++;
      }
    }
    FCLOSE(FP);

    返回计数;
}

void findAllCodes(const char *path)
{
    结构_finddata_t FA;
    长手柄;
    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 FA;
    长手柄;
    char thePath;

    strcpy(thePath,path);
    if((handle=findfirst(strcat(thePath,"/*"),&fa))==-1L)
    {
      fprintf(stderr,"the path is wrong!\n",path);
      返回;
    }
    做
    {
      if(!strcmp(fa.name,".")||!strcmp(fa.name,".."))
      继续;

      if(fa.attrib==_A_SUBDIR)
      {
            sprintf(thePath,"%s%s",path,fa.name);
            查找所有代码(路径);
            findALLDirs(thePath);
      }
    }while(_findnext(handle,&fa)==0);

    _findclose(手柄);
}

int main()
{
    字符路径=".";
    printf("计算中...\n");
    查找所有代码(路径);
    findALLDirs(path);
    printf("目前你总共写了%1d行代码!\n\n",total);
    系统("暂停");
    返回 0;
}

柚本超可爱 发表于 2022-12-12 19:21:25

问答题答案:



动动手答案:


封尘逸寒 发表于 2022-12-13 09:04:46

问答题答案:好的



动动手答案:


曲静如 发表于 2022-12-13 09:14:33

问答题答案:
0.计算机只能识别0和1
1.机器语言(机器码)
2.编码
3.有没有翻译器
4.不能
5.
6.
7.亲们趁敌人吃饭时发动



动动手答案:
114行代码

是小枫吖 发表于 2022-12-13 09:29:39

问答题答案:

w

动动手答案:
w

sun鱼 发表于 2022-12-13 09:59:52

{:5_95:}问答题答案:



动动手答案:


wen792 发表于 2022-12-13 10:15:49

问答题答案:


只识别01
机器语言
编译
跳转
可以
解释器
定义
动动手答案:


sevfo 发表于 2022-12-13 10:34:50

问答题答案:不太会啊




动动手答案:


风园人 发表于 2022-12-13 11:34:15

问答题答案:


0.
动动手答案:


页: 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 [1814] 1815 1816 1817 1818 1819 1820 1821 1822 1823
查看完整版本: S1E2:第一个程序 | 课后测试题及答案