

#include<stdio.h>
void main(int argc, char* argv[])
{
while (argc > 1)
{
++argv;
printf("%s\n", argv);
--argc;
}
}

#include<stdio.h>
#include<stdlib.h>
void main(int argc, char* argv[])
{
int i;
printf("The number of string is: %d\n", argc - 1);
for (i = 1; i < argc; i++)
{
printf("the string %d is:%s\n", i, argv[i]);
}
}









#include<stdio.h>
void main(void)
{
const char* str = "Welcome to Fishc.com!\n\n";
//这个语句的含义是:声明一个名为str的指针变量,
//它指向一个字符型变量,初始化str为指向字符串
//"Welcome to Fishc.com!\n\n"
#if(0)
str[0] = 'w';
#endif
str = "I love Fisfc.com!\n\n";
printf("\n\n%s", str);
}


#include<stdio.h>
void main(void)
{
char* const str = "Welcome to Fishc.com!\n\n";
//常量指针是一个固定的指针,不可以改变它的值,但它所指的数据可以改变
str[0] = 'w';
#if(0)
str = "I love Fisfc.com!\n\n";
#endif
printf("\n\n%s", str);
}
有问题


总结
本篇文章就到这里了,希望能够给你带来帮助,也希望您能够多多关注的更多内容!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

评论(0)