Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. printf("Hello Worldn");
  6. return 0;
  7. }
  8.  
  9. #include <stdio.h>
  10. int main(void)
  11. {
  12. puts("Hello World!");
  13. }
  14.  
  15. #include <stdio.h>
  16.  
  17. #ifndef HELLO_STRING
  18. #define HELLO_STRING "Hello, world!"
  19. #endif
  20.  
  21. int main(int argc, char *argv[], char *envp[])
  22. {
  23. puts(HELLO_STRING);
  24. return 0;
  25. }
  26.  
  27. #include <stdio.h>
  28.  
  29. int main(int argc, char** argv)
  30. {
  31. printf("Hello Worldn");
  32. return 0;
  33. }
  34.  
  35. #include <stdio.h>
  36. #include <stdlib.h>
  37. #include <errno.h>
  38.  
  39. extern int errno;
  40. extern FILE *stdout;
  41.  
  42. int main(int argc, char** argv)
  43. {
  44. errno = 0;
  45.  
  46. int err = printf("Hello Worldn");
  47.  
  48. if (err < 0) {
  49. return EXIT_FAILURE;
  50. }
  51.  
  52. err = fflush(stdout);
  53.  
  54. if (err < 0 || errno != 0) {
  55. return EXIT_FAILURE;
  56. } else {
  57. return EXIT_SUCCESS;
  58. }
  59. }
  60.  
  61. #error Hello World
  62.  
  63. $ cat hello.c
  64. #include <stdio.h>
  65.  
  66. int main(void)
  67. {
  68. printf("Hello world!n");
  69. }
  70.  
  71. $ c99 hello.c
  72. $ ./a.out
  73. Hello world!
  74. $
  75.  
  76. #include <stdio.h>
  77. main()
  78. {
  79. printf("hello, worldn");
  80. }
  81.  
  82. #include <stdlib.h>
  83.  
  84. int main()
  85. {
  86. system("echo Hello World!");
  87. return 0;
  88. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement