
Unique Code Demos Showcase in Various Languages
Discover a collection of code snippets showcasing programming demos in languages like PL/I, BCPL, C, C++, and more. Each snippet provides a glimpse into different language syntax and functionality, presented alongside relevant images and links.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
/* Hello world demo in PL/I */ Hello2: proc options(main); put list ('Hello World'); end Hello2; https://github.com/leachim6/hello-world
// Hello world demo in BCPL GET "LIBHDR" LET START() BE $( WRITES("Hello World*N") $) https://github.com/leachim6/hello-world
/* Hello world demo in B */ main() { putchar ('Hell'); putchar ('o Wo'); putchar ('rld'); putchar ('*n'); } https://www.bell-labs.com/usr/dmr/www/btut.html https://github.com/leachim6/hello-world
* Hello world in FORTRAN-66 WRITE(4,10) 10 FORMAT(' HELLO WORLD!'); END
/* Hello world in C */ main() { printf("Hello world\n"); }
struct dnode { char *key; char *value; struct dnode *next; }; struct pydict { struct dnode *head; struct dnode *tail; int count; };
// Hello world in C++ #include <iostream> int main() { std::cout << "Hello world\n"; return 0; }
/* A C function (ca. 1978) */ int function mult(one, two) int one, two; { return one * two; } // A C++ function (and comment) int function add(int one, int two) { return one + two; }
struct TreeMap { /* Attributes */ struct TreeMapEntry *__head; struct TreeMapEntry *__root; int __count; /* Methods */ void (*put)(struct TreeMap* self, char *key, int value); int (*get)(struct TreeMap* self, char *key, int def); int (*size)(struct TreeMap* self); void (*dump)(struct TreeMap* self); struct TreeMapIter* (*iter)(struct TreeMap* self); void (*del)(struct TreeMap* self); };
main() { stack s1(10), s2; int i; for (i = 0; i < 10; i++) s1.push(i); for (i = 0; i < 10; i++) s2.push(s1.pop()); for (i = 0; i < 10; i++) if (s2.pop() != i) printf("oops: %d\n", i); } ( (( ((& __1s1 )-> stk__5stack = (((int *)__nw__FUi ( (sizeof (int ))* 10 ) ))), ((& __1s1 )-> sp__5stack = (& __1s1 )-> stk__5stack )) ), (((& __1s1 )))) ; ( (( ((& __1s2 )-> stk__5stack = (((int *)__nw__FUi ( (sizeof (int ))* 100 ) ))), ((& __1s2 )-> sp__5stack = (& __1s2 )-> stk__5stack )) ), (((& __1s2 )))) ; for(__1i = 0 ;__1i < 10 ;__1i ++ ) ( (((*((& __1s1 )-> sp__5stack ++ )))= __1i )) ; for(__1i = 0 ;__1i < 10 ;__1i ++ ) ( (__2__X1 = ( ((*(-- (& __1s1 )-> sp__5stack )))) ), ( (((*((&__1s2 )-> sp__5stack ++ )))= __2__X1 )) ) ; for(__1i = 0 ;__1i < 10 ;__1i ++ ) if (( ((*(-- (& __1s2 )-> sp__5stack )))) != __1i ) printf ( (char *)"oops: %d\n",__1i ) ; ( (( ( __dl__FPv ( (char *)(& __1s2 )-> stk__5stack ) , (( (( 0 ) ), 0 ))) , 0 ) )) ; ( (( ( __dl__FPv ( (char *)(& __1s1 )-> stk__5stack ) , (( (( 0 ) ), 0 ))) , 0 ) )) ;