This old retired programmer found this funny! (I did NOT analyze - TopicsExpress



          

This old retired programmer found this funny! (I did NOT analyze the code! I would add more comments!) The Evolution of a Programmer High School/Jr.High 10 PRINT HELLO WORLD 20 END ================================= First year in College program Hello(input, output) begin writeln(Hello World) end. ================================= Senior year in CollegeHumor (defun hello (print (cons Hello (list World)))) ================================= New professional #include void main(void) { char *message[] = {Hello , World}; int i; for(i = 0; i < 2; ++i) printf(%s, message[i]); printf(\n); } ================================= Seasoned professional #include #include class string { private: int size; char *ptr; string() : size(0), ptr(new char[1]) { ptr[0] = 0; } string(const string &s) : size(s.size) { ptr = new char[size + 1]; strcpy(ptr, s.ptr); } ~string() { delete [] ptr; } friend ostream &operator
Posted on: Wed, 18 Jun 2014 23:28:44 +0000

Trending Topics



Recently Viewed Topics




© 2015