fork download
  1. /* prog10_20, 指標陣列 */
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. int main(void)
  5. {
  6. int i;
  7. char *ptr[3]={"Tom", "Lily", "James Lee"};
  8. for(i=0;i<3;i++)
  9. puts(ptr[i]); /* 印出指標ptr[i]所指向的字串 */
  10.  
  11. system("pause");
  12. return 0;
  13. }
  14.  
Success #stdin #stdout #stderr 0s 2292KB
stdin
Standard input is empty
stdout
Tom
Lily
James Lee
stderr
sh: pause: not found