1 //test.cpp
 2 #include <stdio.h>
 3 int g_var = 0;
 4 void print_line(char *str)
 5 {
 6     if (str != NULL)
 7         printf("%s\r\n", str);
 8     else
 9         printf("null string\r\n");
10 }
11 int main (int argc, char **argv)
12 {
13     int l_var = 1;
14     print_line("hello world!");
15     printf("g_var = %d, l_var = %d.\r\n", g_var, l_var);
16     return 0;
17 }
View Code

相关文章:

  • 2021-09-10
  • 2022-12-23
  • 2021-12-20
  • 2021-06-16
  • 2021-04-13
  • 2021-10-28
猜你喜欢
  • 2022-02-13
  • 2022-12-23
  • 2021-10-18
  • 2022-01-14
  • 2021-09-11
  • 2021-06-12
  • 2021-09-06
相关资源
相似解决方案