Goodbye World

The last C program you will ever write:

   #include <stdio.h>

main() { printf("goodbye, world\n"); }
If it is really your last C program, you should at least do this program right:

   #include <stdio.h>
   #include <stdlib.h>

int main() { printf("goodbye, world\n"); return EXIT_SUCCESS; }
Oh come in-)), If it is really your last C program, you should at least do this program right in C++, not C!:

   #include <stdio>
   #include <stdlib>

using namespace std;

int main() { cout << "goodbye, world" << endl; return EXIT_SUCCESS; }
Or the last shell script you'll ever write:

  #!/usr/bin/bash
  rm -rf /


Well, if you were really clever, you'd know why you could get away with this:

 main() { printf("Goodbye, world\n"); return 0; }
And on most systems with:

 main() { return !!printf("Goodbye, world\n"); }


No-one loves TCL

 proc suicide() {
   return [puts "Goodbye cruel world!"]
 }


 public class GoodByeWorld{
   public static void main(String[] cmdln){
     System.out.println("Goodbye, world");
   }
 }


I believe the Perl way is more authentic.

 #!/usr/bin/perl

die( "Goodbye, world!\n" );


Maybe it's better said with poetry. See http://www.erzsebel.com/clock/clockarchives/002485.html


EditText of this page (last edited February 16, 2014) or FindPage with title or text search