大神,解析下这C语言,看不懂啊!!!
1。#include<stdio.h>voidf1(intn){while(n--)printf("%d",n);printf("%d\n",n);}intf2(intn...
1。#include <stdio.h>
void f1(int n)
{
while(n--)
printf("%d ",n);
printf("%d\n",n);
}
int f2(int n)
{
if(n<=2) return 1;
else returnf2(n-1)+f2(n-2);
}
main()
{
int a=4;
printf("%d %d\n",a!=a,a&&10);
printf("%d %d\n",~(~a^a),a|1);
f1(3);
printf("%d %d\n",f2(4),f2(5));
}
2。。#include <stdio.h>
int f(int n)
{
static int k=1;
k++;
return 2*n+k;
}
main()
{
printf("%d\n",f(4));
printf("%d\n",f(f(4)));
}
3。。#include <stdio.h>
main()
{
int i,j;
char*s[4]={"five","four","three","seven"};
for(i=0;i<4;i++)
for(j=i;j<4-i;j++)
printf("%s\n",s[i]+j);
} 展开
void f1(int n)
{
while(n--)
printf("%d ",n);
printf("%d\n",n);
}
int f2(int n)
{
if(n<=2) return 1;
else returnf2(n-1)+f2(n-2);
}
main()
{
int a=4;
printf("%d %d\n",a!=a,a&&10);
printf("%d %d\n",~(~a^a),a|1);
f1(3);
printf("%d %d\n",f2(4),f2(5));
}
2。。#include <stdio.h>
int f(int n)
{
static int k=1;
k++;
return 2*n+k;
}
main()
{
printf("%d\n",f(4));
printf("%d\n",f(f(4)));
}
3。。#include <stdio.h>
main()
{
int i,j;
char*s[4]={"five","four","three","seven"};
for(i=0;i<4;i++)
for(j=i;j<4-i;j++)
printf("%s\n",s[i]+j);
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询