......

/*#include<stdio.h>
void exch(int t[])
{
*t=*(t+5);//t[0]=t[5];
}
main()
{
int x[10]={1,2,3,4,5,6,7,8,9,10},i=0;
while(i<=4)
{
exch(&x[i]);
i++;
}
for(i=0;i<5;i++)
printf("%3d",x[i]);
printf("\n");
}*/
/*#include<stdio.h>
void fun(int (*p)[3],int m,int n)
{
int i,j;
for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
printf("%3d",p[i][j]);
printf("\n");
}
}
main()
{
int a[2][3]={1,3,5,7,9,11};
fun(a,2,3);
}*/
/*#include<stdio.h>
int fun(int *s,int t,int *k)
{
int i,max,m=0;
k=s+1;
max=*s;
for(i=0;i<t-1;i++)
{
if(*(k+i)>max)
{
max=*(k+i);
m=i+1;
}
}
return printf("max is:%d,%d\n",m,max);
}
main()
{
int i,s[10]={0},*p=0;
printf("请输入10个数:\n");
for(i=0;i<10;i++)
scanf("%d",&s[i]);
fun(s,10,p);
}*/
/*#include<stdio.h>
#define N 100
void len_cat(char c1[],char c2[])
{
  char *x, *y;
  x=(char*)c1;
  y=(char*)c2;
  while(*x)
{ x++;}
  while(*y)
  {
     *x=*y;
     x++; 
     y++;
  }
  *x=0;
}
main()
{
char s[N],t[N];
printf("输入字符串S:");
gets(s);
printf("输入字符串T:");
gets(t);
len_cat(s,t);
printf("%s\n",s);
}*/
/*#include<stdio.h>
#define N 100
long fun(char *p)
{
int i,b=0;
for(i=0;*(p+i)!='\0';i++)
b=b*10+(*(p+i)-48);
return printf("%d\n",b);
}
main()
{
char a[N];
printf("输入数字字符串:");
gets(a);
fun(a);
}*/
#include<stdio.h>
#define N 100
int fun(char *ptr)
{
int i,j,count=0,b[N];
for(i=0;*(ptr+i)!='\0';i++)
{
if(*(ptr+i)>='A'&&*(ptr+i)<='Z'||*(ptr+i)>='a'&&*(ptr+i)<='z')
count++;
b[count]=*(ptr+i);
}
return count;


}
main()
{
char a[N];
printf("输入一个字符串:");
gets(a);
printf("%d\n",fun(a));
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值