题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-11-09 23:04:42

[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串:abc123edf456gh,执行程序后输出:123456。请填空。   #include  <stdio.h>   #include  <ctype.h>   main( )   { char s[80], d[80]; int i,j;    gets(s);    for(i=j=0;s[i]!=’’/0’’;i++)      if(【 】) { d[j]=s[i]; j++; }    d[j]=’’/0’’;    puts(d);   }

更多"以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符"的相关试题:

[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串:abc123edf456gh,执行程序后输出:123456。请填空。
#include
#include
main( )
{ char s[80], d[80]; int i,j;
gets(s);
for(i=j=0;s[i]!=’/0’;i++)
if( 【20】 ) { d[j]=s[i]; j++; }
d[j]=’/0’;
puts(d);
}

[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串:abcl23edf456gh,执行程序后输出:123456。请填空。
#include <stdioo.h>
#include <ctype.h>
main( )
char s[80],d[80]; int i,j;
gets(s);
for(i=j=0;s[i]!=’/0’;i++)
if( 【20】 )d[j]=s[i];j++;
d[j]=’/0’;
puts(d);
[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串 :abc123edf456gh,执行程序后输出:123456请填空.
#include <stdio.h>
#include <ctype.h>
main( )
char s[80], d[80]; int i,j;
gets(s);
for (i=j=0;s[i]!=’/0’;i++)
if( ) d[j]=s[i]; j++;
d[j]=’/0’;
puts (d);

[填空题]以下程序的功能是将字符串s中的数字字符放入d数组中,最后输出d中的字符串。
例如,输入字符串:abc123edf456gh,执行程序后输出:123456。请填空。
#include <stdio.h>
#include <ctype.h>
main( )
char s[80],d[80]; int i,j;
gets(s);
for(i=j=0;s[i]! =’/0’;i++)
if( 【9】 ) d[j]=s[i]; j++;
d[j]=’/0’;
puts(d);

[填空题]以下程序的功能是将宁符串s中的数字字符放入d数组中,最后输出d中的字符串。例如,输入字符串:abcl23edf4568h,执行程序后输出:123456。请填空。
#include <stdio.h>
#include <ctype.h>
main( )
char s[80],d[80]; int i,j;
gets(s);
for(i=j=0;s[i]!=’/0’;i++)
if( 【20】 ) d[j]=s[i];j++;
d[j]=’/0’;
puts(d);

[填空题]以下程序的功能是将字符串s中的数字字符放人d数组中,最后输出d中的字符串。例如,输入字符串abc123edf456gh,执行程序后输出123456。请填空。
# include<stdio. h>
# include<ctype. h>
main( )
char s[80], d[80]; int i, j;
gets(s);
for(i=j=0; s[i]!=’/0’; i++)
if( 【6】 ) d[j]=s[i]; j++;)
d[j]=’/0’;
puts(D) ;

[填空题]以下程序的功能是:对输入的一行字符串的数字字符按它们的字面值累加,输出此累加和。例如,输入一行字符是:ab34dh8u,输出值应当是15。请填空。
#include <stdio.h>
#include <ctype.h>
main( )
char ch; int a,s;
______;
while((ch=getchar( ))______)
if( isdigit (ch))
a=______;s+=a;
printf("s=%d/n/n",s);
[填空题]以下程序段的功能是:创建一个字符串,其内容为由0到9的十个数字所组成的字符串,每个字符串之间用空格隔开。外层循环使用一个变量当做循环计数器,每循环一次,变量值减一。请将下列程序补充完整。
Dim Words,Chars,MyString
Flor Words=10 T0 1 Step -1
ForChars=0 To 9
MyString=______
Next Chars
MyString=______
Next Words
[填空题]以下程序的功能是:对输入的一行字符中的数字字符的字面值累加,输出此累加和, 请填空。 #include<stdio.h> #include<ctype.h> main( ) {char c; int a,s=0; while(______) if(isdigit(c)) {a=c-’0’;s+=a;} printf("S=%d",s); }
[填空题]以下程序的功能是:对输入的一行字符中的数字字符的字面值累加,输出此累加和,
请填空。
#include<stdio.h>
#include<ctype.h>
main( )
char c;
int a,s=0;
while(______)
if(isdigit(c))
a=c-’0’;s+=a;
printf("S=%d",s);

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码