赞
踩
练习11-1
- #include <stdio.h>
-
- int main(void){
- char *p = "123";
- printf("p=\"%s\"\n", p);
- p = "456";
- printf("p=\"%s\"\n", p);
-
- return 0;
- }
练习11-2
- #include <stdio.h>
-
- int count(const char*c){
- int n = 0;
- while (*c++)
- n++;
- return n;
- }
- int main(void)
- {
- int i;
- int n = 0;
- char a[][5] = { "LISP", "C", "Ada" };
- char *p[] = { "PAUL", "X", "MAC" };
-
-
- for (i = 0; i <count(a); i++)
- printf("a[%d] = \"%s\"\n", i, a[i]);
-
- for (i =
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。