Skip to main content

Posts

The true emptiness

It is very important for me to express to you how much you really mean to me. I wish I could do this in person exquisitely. But since we are physically separated by miles of emptiness, this expression must come in the form of letters such as this. Life seems to be full of trials of this type which test my inner strength, and more importantly, my devotion and love for you. After all, it is said that “True Love” is boundless and immeasurable and overcomes all forms of adversity. In truth, if it is genuine, it will grow stronger with each assault upon its existence. I am happy this way. Life is so kind for giving someone like you as my sole inspiration. My love has been assaulted many times, and I am convinced that it is true because the longer I am away from you, the greater is my yearning to see you again. Across the miles, I send to you my tender love and my warm embrace. Thank you for being one of my life’s sweetest blessings.

Mystery program

This program is system-dependent, it will run correctly on many different systems. Try it on your machine. #if (VAX || PC)         #define HEX0 0x6c6c6548         #define HEX1 0x77202c6f         #define HEX2 0x646c726f         #define HEX3 0x00000a21 #else         #define HEX0 0x48656c6c         #define HEX1 0x6f2c2077         #define HEX2 0x6f726c64         #define HEX3 0x210a0000 #endif typedef union {         char what[16];         long cipher[4]; } mystery; int main(void) {         mystery x;         x.c...

List application

To illustrate the use of those functions, here is an example. #include <stdio.h> #include <stdlib.h> #include "list.h" LINK string_to_list(char []); void print_list(LINK); int count_rec(LINK); int main(void) {         LINK h;         h = string_to_list("ABC");         printf("The resulting list is\n");         print_list(h);         printf("\nThis list has %d elements.\n", count_rec(h));         return 0; } The output of the program is The resulting list is A --> B --> C --> NULL This list has 3 elements.

Printing a list using recursion

This is a function for displaying a list. Oh I just love recursion. void print_list(LINK head) {         if (head == NULL)                 printf("NULL");         else {                 printf("%c --> ", head -> d;                 print_list(head -> next);         } }

Pro guns

It is indeed true that my passion for guns already existed long before I came to this chaotic world. Guns are the most outstanding weaponry ever in the history of man. Let me give you some facts about my preferred gun as of the moment. Avtomat Kalashnikov 47 (AK-47) Country: Soviet Union/Russian Federation Type: Assault Rifle Inventor: Mikhail Kalashnikov Year of design: 1947 Service duration: 1951-Present Cartridge: 7.62 mm X 39 Action: Gas-Operated rotating bolt Rate of fire: 600 rpm Muzzle velocity: 710 m/s Effective rage: 300 m Weight: 4.3 kg (unloaded) Length: 870 mm Barrel: 415 mm Magazine Cap.: 30 Viewing sights: Adjustable iron sights, optional mount required for optical scope Variants: AK-47, AKS, AKM, AKMS, AK-74, AK-101, AK-103 Number built: More than 1 million excluding unlicense...

Counting a list iteratively

This is a simple way of counting elements in a list. For some, they would prefer to embed this operation upon list creation and insertion or deletion. int count_it(LINK head) {         int cnt = 0;         for ( ; head != NULL; head = head -> next)                 ++cnt;         return cnt; }