下面程序的运行结果是:。#include main( ){char string1[]="I have a book";char string2[]={'H','o','w',' ','a','r','e',' ','y','o','u'};printf("%s\n",string1);printf("%s\n",string2);}
查看答案
下面程序在运行输入:abcdefg (回车),则输出是:。#include main(){char str[100];printf("输入字符串:\n"); scanf("%s",str);inverse(str); printf("轮换后的字符串是:%s\n",str);}inverse(char str[]){char t;int i,j;for(i=0,j=strlen(str); i
编写函数acopy( ),将数组a[]的内容赋值到b[]数组中。(以999做结束标志)#include void acopy(1){int i=0;while (a[i]!=-999){2i++;}b[i]= 3}main( ){ int a[]={1,2,3,4,5,6,7,8,9,10,999};int b[100], i=0;4while (b[i]!=-999) printf("%d",b[i++]);}
找出并显示以字母’C’开头的姓名数据。#include main( ){char name[][8]={"China","Japan","Canada","Germany"};int i;for (i=0;i<4;i++)if ( ) printf("%s\n",name[i]);}
输入一字符串,将字符串从最后一个开始,按倒序显示在屏幕上。#include main( ){char a[10];int i;printf("Please imput yuor string:\n");for (①)scanf("%c",&a[i]);for (②)printf("%c",a[i]);}