在学C,comparison between pointer and integer求解答
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/09/13 21:46:43
在学C,comparison between pointer and integer求解答
#include
void main(){
\x05char a[30];
\x05char *p;
\x05int i;
\x05printf("please input a string:\n");
\x05scanf("%s",a);
\x05printf("result:\n");
\x05printf("%s\n",a);
\x05i=0;
\x05while(a[i]!=NULL){
\x05\x05printf("%c",a[i]);
\x05\x05i++;
\x05}
\x05printf("\n");
\x05p=a;
\x05printf("%s\n",p);
\x05while(*p!=NULL){
\x05\x05printf("%c",*p);
\x05\x05p++;
\x05}
#include
void main(){
\x05char a[30];
\x05char *p;
\x05int i;
\x05printf("please input a string:\n");
\x05scanf("%s",a);
\x05printf("result:\n");
\x05printf("%s\n",a);
\x05i=0;
\x05while(a[i]!=NULL){
\x05\x05printf("%c",a[i]);
\x05\x05i++;
\x05}
\x05printf("\n");
\x05p=a;
\x05printf("%s\n",p);
\x05while(*p!=NULL){
\x05\x05printf("%c",*p);
\x05\x05p++;
\x05}
因为不是比较指针, 所以这里不要用NULL
用0或者'\0'都好
用0或者'\0'都好
求一篇英语作文 make the comparison and contrast between the Chinese
求问GRE逻辑题A ten-year comparison between the United States and
make a comparison between William Wordsworth's London and Wi
Comparison between British English and American English 的英语文
Comparison of Color Words between Chinese and English Cultur
Comparison on Cultural Differences between Chinese and Ameri
A Comparison between the Spring Festival and Christmas
The Comparison of Children Education between China and Ameri
Comparison between the heroic adventures of Sir Gawain and o
make a comparison of education between America and China
Make a comparison between the British educational system and
要写论文了.The Comparison between Chinese and Western Business Of