我是一名大二学生,学工科的,我想提高一下自己的C语言编程能力,我已经通过2级了,应该选什么内容练习。

2024-05-09 14:39

1. 我是一名大二学生,学工科的,我想提高一下自己的C语言编程能力,我已经通过2级了,应该选什么内容练习。

做项目可以让你熟练C语言,学一下汇编语言可以加深对C语言的了解。

我是一名大二学生,学工科的,我想提高一下自己的C语言编程能力,我已经通过2级了,应该选什么内容练习。

2. 国二c语言考试,是不是大题只有编程题,而且只有一道?

是啊 评分系统只检测答案文件out.dat 过程写多少也没有分数 只有运行结果正确才给分

3. 一个大二学生急需您的帮助:一道大后天就要交的C语言编程题!

#include 
#include 
#include 
#include 
#define LEN sizeof(struct student)

struct student 
{
    int num ;
    char name[16];
    char grade[10];
    char class[10];
    int English;
    int Math;
    int Physics;
    int Physical;
    int Eletric;
    int lisan;
    int cprogram;
    int lawy;
    int public;
    int sixiou;
    int average;
    int total;
    int state;
    struct student *next ;
};

/*=====================================================================*/
struct student *save1(struct student *head) /*保存链表,保存到文件中*/   
{FILE *fp;
 char filepn[20];
 struct student *p;  
 p=(struct student *)malloc(LEN);
 p=head;  
 printf("Please input the file name!:");  
 scanf("%s",filepn);
 if((fp=fopen(filepn,"w+"))==NULL) 
 {
  printf("cannot open the file !\n");  
 getch();  
}
 fprintf(fp,"-----------------------------------------------------------------\n");
fprintf(fp,"    THE SYSTEM OF STUDENTS'SCORED MANGERMENT,MADE BY ZUEC\n"); 
 fprintf(fp,"                  Designed by zuec !\n"); 
 fprintf(fp,"-----------------------------------------------------------------\n");
 /*打印表格域*/
 while(p!=NULL)
 {fprintf(fp,"|************************|num: %d  |****************************|",p->num);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|name:----------|%s                                               ",p->name);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|Class and grade|I'm in class %s grade %s                          ",p->class,p->grade);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|Math:----------|%5.1d          |                                 |",p->Math);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|English:-------|%5.1d          |                                 |",p->English);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|Physics:-------|%5.1d          |                                 |",p->Physics);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|physical:------|%5.1d          |                                 |",p->Physical);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|Eletric:-------|%5.1d          |                                 |",p->Eletric);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|lisan:---------|%5.1d          |                                 |",p->lisan);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|cprogram:------|%5.1d          |                                 |",p->cprogram);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|sixiou:--------|%5.1d          |                                 |",p->sixiou);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|public:--------|%5.1d          |                                 |",p->public);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|lawy:----------|%5.1d          |                                 |",p->lawy);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|total:---------|%5.1d          |                                 |",p->total);
fprintf(fp,"\n|-----------------------------------------------------------------|");
fprintf(fp,"\n|avrage:--------|%5.1d          |                                 |",p->average); 
fprintf(fp,"\n|-----------------------------------------------------------------|\n");
 
  p=p->next;    
 
 }
 fclose(fp);
 printf("The file have been saved!\n");  
 getch();return(head);
}
/*======================================================================*/
void save2(struct student *head) 
{FILE *fp; 
 char filepn[20]; 
 struct student *p1; 
 p1=head;
 printf("Please input the file name!:");  
 scanf("%s",filepn); 
 if((fp=fopen(filepn,"wb+"))==NULL) 
 {
  printf("cannot open the file !\n");   
 getch();  
 }
while(p1!=NULL)
 {if(fwrite(p1,LEN,1,fp)!=1) 
  {printf("file write error!\n");getch();}
  else p1=p1->next;
 }
  fclose(fp);
 printf("The file have been saved!\n");  
 getch(); 
}

/*======================================================================*/
 void print(struct student *head);   /*print函数的声明*/
struct student *load()
{FILE *fp;
  struct student *p1,*p2,*head;
  int n=0;
  char filepn[20];
 printf("Please input the file name!:");
   scanf("%s",filepn);
     if((fp=fopen(filepn,"rb"))==NULL) 
 {
  printf("Cannot open the file !\n");  
  getch();
 }
  printf("------------------------------------------------------------------\n");
  printf("    THE SYSTEM OF STUDENTS'SCORED MANGERMENT,MADE BY ZUEC \n");
  printf("                     Designed by zuec                     \n");
  printf("------------------------------------------------------------------\n");
 if(!feof(fp))
 { n=n+1;  
  p1=p2=(struct student *)malloc(LEN); 
   if(fread(p1,LEN,1,fp)!=1) 
   {if(feof(fp))
    printf("filereaderror!\n"); 
   }
  else {p2=p1;print(p1);getch();} 
 if(n==1) head=p1; 
 else p2->next=p1; 
 }
else printf("File be read error!");
 p1->next=NULL;  
 return(head);fclose(fp);          
}  


/*====================================================================*/ 
/*输入链表的函数*/
struct student *input(struct student *p)
{
     getchar();
    printf("\nname:");    gets(p->name);
    printf("\ngrade:");    gets(p->grade);
    printf("\nclass:");    gets(p->class);
    printf("\nEnglish:");    scanf("%d",&p->English);
    printf("\nMath:");    scanf("%d",&p->Math);
    printf("\nPhysics:");    scanf("%d",&p->Physics);
    printf("\nPhysical:");    scanf("%d",&p->Physical); 
    printf("\nEletric:");    scanf("%d",&p->Eletric);
    printf("\nlisan:");    scanf("%d",&p->lisan);
    printf("\ncprogram:");    scanf("%d",&p->cprogram); 
    printf("\nsixiou:");    scanf("%d",&p->sixiou);
    printf("\npublic:");    scanf("%d",&p->public);
    printf("\nlawy:");    scanf("%d",&p->lawy);
    (p->total)=(p->English)+(p->Math)+(p->Physics)+(p->Physical)+(p->Eletric)+(p->lisan)+
             (p->cprogram)+(p->sixiou)+(p->public)+(p->lawy); 
    (p->average)=(p->total)/10 ;
     getch();
    return(p);  
} 
 
/*=======================================================================*/
/*创建链表的函数,返回值为链表的头指针*/  
struct student *creat(void)
{
 struct student *head;
 struct student *p1,*p2,*p3,*max; 
 int i,j,n,k;
 char t[10];
  n=0;
     p1=p2=p3=(struct student *)malloc(LEN);head=p3;
       printf("input the number (if enter 0 ,exit!)\n");
repeat1: printf("num(num>0):");
       scanf("%d",&p1->num);
     while(p1->num<0)
   {getchar();
    printf("error! please input num angain:");
       scanf("%d",&p1->num);}

  if(p1->num==0)
   goto end;
  else
  {
  p3=head;
  if(n>0)
   {for(i=0;i<n;i++)
           {if(p1->num!=p3->num)
     p3=p3->next;
     else
     {printf("The num have exsisted,please intput angain:!\n");
     goto repeat1;

        }
    }
   }
  }
       p1=input(p1);

head=NULL;
 while(p1->num!=0)
  {
    n=n+1;
 if(n==1)
  head=p1;
 else

    p2->next=p1;
    p2=p1;
    p1=(struct student *)malloc(LEN);
    printf("Please input students'massage,(enter 0 exit)!\n");
repeat2:printf("please input the number of one student (num>0):");
      scanf("%d",&p1->num); 

   while(p1->num<0)
   {getchar();
    printf("error!please input angain:");
       scanf("%d",&p1->num);}

  if(p1->num==0)
   goto end;
  else
  {p3=head; 
  if(n>0)
   {for(i=0;i<n;i++)
      {if(p1->num!=p3->num)
    p3=p3->next;
    else
    {printf("the num have exsisted,please input angain:\n"); 
     goto repeat2;

    }
    }
   }

  }
      p1=input(p1);

 }

end: p1=head;
     p3=p1;
  for(i=1;i<n;i++)
               {
             for(j=i+1;j<=n;j++)
                 {
       max=p1;
       p1=p1->next;

       if(max->num>p1->num)  
        {
        k=max->num;
        max->num=p1->num;
        p1->num=k;


        }

                 }
    max=head;p1=head;
  }
p2->next=NULL;
       printf("the num of students you have inputed:%d!\n",n);
getch();       return(head);

}


/*===================================================================*/
/*插入链表,一定要有返回值*/
struct student *insert(struct student *head)
{
    struct student *p,*p1,*p2 ;
    /*创建指针,访问链表*/
    p=(struct student *)malloc(LEN);
    printf("num:");
    scanf("%d",p->num);
    input(p);
    p1=head ;
    if(head==NULL)   
    {
        head=p ;
        head->next=NULL ; 
        return(head);
    }
    while(p->num > p1->num && p1->next!=NULL) 
    {
        p2=p1 ;
        p1=p1->next ;
    }
    if(p->numnum) 
    {
        /*插入的为函数的首部*/ 
        if(head==p1)
        {
            p->next=head ; 
            head=p ;return(head);
        }
        else 
        {
            p2->next=p ;
            p->next=p1 ; 
        } 
    }
    else 
    {
        p1->next=p ;
        p->next=NULL ; 
    } 
    return(head);
}
/*================================================================*/

一个大二学生急需您的帮助:一道大后天就要交的C语言编程题!

4. 明天计算机二级C语言考试,求一个过关技巧,就是最后一个编程大题的,我大概知道,但网上的都没讲清楚,

现在二级考试都是上机考试,最后一题直接运行,结果正确给全分,错误不给分, 没人看你步骤。

5. 国二C语言编程题:输入两个数,求最大公约数。

#includeint main()
{int main_1(int x,int y,int z);
 int a,b,min,m;
 
 printf("please enter two integer numbers:\n");
 scanf("%d%d",&a,&b);
 min=(a>b)? b:a;
 
 m=main_1(a,b,min);
 
 if(m==0)  printf("a,b没有最大公约数!\n");
 else printf("a,b的最大公约数为%d\n",m);
 return 0;
} 
int main_1(int x,int y,int z)
{int i,m=0;
 for(i=z;i>1;i--)
 { if(x%i==0&&y%i==0)  
  {m=i;break;}
 } 
 return m;
}
 

 

 
 
 


国二C语言编程题:输入两个数,求最大公约数。

6. 谁能介绍一本c语言题库?刚上大二,入门级的。

在文库里搜,很多

7. 我是一大二的学生,想学好编程,希望有c语言或c++学的不错的高手帮帮

我也是大二的,其实编程很多都需要自己动手去弄懂。
 
在大一的时候,班级里有些同学很少敲代码,虽然最后考试也过了,可一年下来,很多同学连调试都不会,想想很不可思议。
 
图书馆里借两本好书来看看应该可以了,像《C Primer Plus》之类的书还是不错的,C++的话我个人比较喜欢《C++ Primer》,至少这本书讲的比较全面,也很精辟。就是题目少了点,需要自己另外找题目做。
可以加几个C/C++的讨论群,遇到问题发群上,会有高手帮忙的。
一起努力啦!

我是一大二的学生,想学好编程,希望有c语言或c++学的不错的高手帮帮

8. 二级c语言 程序设计题难度很大吗 为什么说只是想考证的一般就放弃的

 不难。
c语言需要熟练运用语法的基本类型、控制流程、函数、结构和常用函数等,c语言的特点也是重点,作为入门语言会考一些常识,比如ascii码表占很大部分的分数,简单计算和简单算法。掌握程序设计中简单的数据结构和算法并能阅读简单的程序,在 Visual C++集成环境下,能够编写简单的C程序,并具有基本的纠错和调试程序的能力。

扩展资料:
二级c语言注意事项:
用户需要注意二级C语言每一年安排两次或三次考试,前两次分别在3月下旬和9月中旬,后一次在12月初,为可选,只有当报考数达到一定要求时考点才会开考。
直接解答法,多用在数理科的试题中,根据已知条件,通过计算、作图或代选择依次进行验证等途径,得出正确答案。
淘汰错误法,把选择题各选择项中错误的答案排出,余下的便是正确答案。
参考资料来源:百度百科-二级C语言
最新文章
热门文章
推荐阅读