福建省计算机专升本 C语言 复习参考材料


福建省计算机专升本 C语言 复习参考材料
资源截图
代码片段和文件信息
#include 
 
int main()
  {
int y=3;
while(y--)printf(“A“);

printf(“y=%d
“y);
   return 0;
}

#include 

#define  MIN(xy)  ((x)<(y)?(x):(y))

int main()
  {
int a=12b=8c;
c=10*MIN(ab);

   printf(“%d“c); 
   return 0;
}

#include 
#include
 

int main()
  {
char  x[80]={“AB“} y[80]={“LMNP“};
int n=0;
strcat(xy);
while(x[n++]!=‘‘)
y[n]=x[n];
puts(y);

   return 0;
}
#include                       // 这是编译预处理命令 
int main( )                             // 定义主函数
{                                       // 函数开始 
  int absum;                          // 本行是程序的声明部分,定义a、b、sum为整型变量
  a = 123;                              // 对变量a赋值    
  b = 456;                              // 对变量b赋值 
  sum = a + b;                          // 进行a+b 的运算,并把结果存放在变量sum中
  printf(“sum is %d
“sum);            // 输出结果 
  return 0;                             // 使函数返回值为0
}                                       // 函数结束 

  

#include 
int main( )                          // 定义主函数
{                                    // 主函数体开始
 int max(int xint y);               // 对被调用函数max的声明 
 int abc;                          // 定义变量a,b,c
 scanf(“%d%d“&a&b);               // 输入变量a和b的值
 c = max(ab);                       // 调用max函数,将得到的值赋给c 
 printf(“max=%d
“c);               // 输出c的值
 return 0;                           // 返回函数值为0
}

int max(int xint y)                 //定义max函数函数值为整型 形式参数x和y为整型 
{
 int z;                              // max函数中的声明部分,定义本函数中用到的变量z为整型 
 if (x > y) z = x;
 else z = y;
 return(z);                          //将z的值返回,通过max带回到调用函数的位置
}

#include 
int main( )
{
 int it;
 t=1;
 i=2;
 while(i<=5)
 {
  t=t*i;
  i=i+1;
 }
 printf(“%d
“t);
 return 0;
}

#include 
int main ( )
{
  char c1c2;
  c1=‘A‘;                         // 将字符‘A‘的ASCII代码放到c1变量中
  c2=c1+32;                       // 得到字符‘a‘的ASCII代码,放在c2变量中 
  printf(“%c
“c2);              // 输出c2的值,是一个字符
  printf(“%d
“c2);              // 输出c2的值,是字符‘a‘的ASCII代码
  return 0;
}



#include 
int main()
{
  char ch;
  scanf(“%c“&ch);
  ch=(ch>=‘A‘ && ch<=‘Z‘) ? (ch+32) : ch;
  printf(“%c
“ch);
  return 0;
}

#include 
int main()
{
  char grade;
  scanf(“%c“&grade);
  printf(“Your score:“);
  switch(grade)
  { 
 case ‘A‘: printf(“85~100
“);break;
     case ‘B‘: printf(“70~84
“);break;
     case ‘C‘: printf(“60~69
“);break;
     case ‘D‘: printf(“<60
“);break;   
     default:  printf(“data error!
“);  
  }
  return 0;
 }

#include 
int main()
{
  int yearleap;
  printf(“enter year:“);
  scanf(“%d“&year);
  if((year%4==0 && year%100!=0) || (year%400==0))
     leap=1;
  else
     leap=0;
  if (leap)
     printf(“%d is “year);
  else
     printf(“%d is not “year);
  printf(“a leap year.
“);
  return 0;
}


#include 
#includ

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    5854246  2018-02-09 06:22  C2011-2007年专升本真题.pdf

     文件    2983859  2018-02-09 06:01  C2012mA.pdf

     文件    6723584  2019-01-25 16:59  CC language.ppt

     文件   37704824  2017-12-30 19:44  CVC6.0green.rar

     文件      18370  2019-01-19 17:27  C典型案例代码.c

     文件       7878  2019-01-06 23:16  C考试大纲.txt

     目录          0  2019-01-25 19:17  C

----------- ---------  ---------- -----  ----

             53292761                    7


版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)