

- #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);
- }
有问题


总结
本篇文章就到这里了,希望能够给你带来帮助,也希望您能够多多关注w3xue的更多内容!