Create your own C Header file

See the following simple example to learn: (tested in gcc)
File 1: myLib.c
int sum(int a, int b)
{
      return a+b;
}
File 2: myLib.h
int sum(int, int);
File 3: testLib.c
#include<stdio.h>
#include"myLib.h"
int main()
{
      printf("%d\n",sum(10,20));
      return 0;
}
Commands to run:
gcc myLib.h myLib.c testLib.c
./a.out

so fast - Judy Arrays

 Some of the reasons Judy outperforms binary trees, b-trees, and skip-lists:
  • Judy rarely compromises speed/space performance for simplicity (Judy will never be called simple except at the API).
  • Judy is designed to avoid cache-line fills wherever possible. (This is the main design criteria for Judy.)
  • A b-tree requires a search of each node (branch), resulting in more cache-line fills.
  • A binary-tree has many more levels (about 8X), resulting in more cache-line fills.
  • A skip-list is roughly equivalent to a degree-4 (4-ary) tree, resulting in more cache-line fills.
  • An "expanse"-based digital tree (of which Judy is a variation) never needs balancing as it grows.
  • A portion (8 bits) of the key is used to subdivide an expanse into sub-trees. Only the remainder of the key need exist in the sub-trees, if at all, resulting in key compression.

Learn more here.

A puzzle game (with video solution)

All submissions for this problem are available.
Johnny has some difficulty memorizing the small prime numbers. So, his computer science teacher has asked him to play with the following puzzle game frequently.
The puzzle is a 3x3 board consisting of numbers from 1 to 9. The objective of the puzzle is to swap the tiles until the following final state is reached:
1 2 3
4 5 6
7 8 9
At each step, Johnny may swap two adjacent tiles if their sum is a prime number. Two tiles are considered adjacent if they have a common edge.
Help Johnny to find the shortest number of steps needed to reach the goal state.

Input:

Battery charging for Android-phones via wi-fi

Perpetual charging on the go for your Android phone might no longer be a distant dream, courtesy the new AirPower technology developed by RCA which sucks power from WiFi signals and constantly charges your phone’s battery.
Read more.

Mobile Application Development On Symbian

For all those who are not too sure what Symbian is . It is an Operating System for Smartphones used widely by leading mobile phone manufacturers like NOKIA, Samsung, Sony-Ericsson. And hold your breadth, virtually 50% of all smart-phones run on Symbian ( these figures are not cooked up)....
Read more.

The Wonders of the MIT Media Lab

The Media Lab at the Massachusetts Institute of Technology (MIT) is the kind of place that makes you think the future might not be so scary after all. Instead of being a wasteland overrun by machines hell-bent on human destruction, the students here are encouraged to build the kind of future they want to see. And that’s more likely to mean a world full of Star Trek gadgets and friendly robots that want to make you a cup of fair-trade coffee. Read more....

Conversion of C/C++ program to Assembly Language using g++ compiler

Use the following statement :
g++ filename.c -S
or
g++ filename.cpp -S
example 1:
c program: Int.c
#include
int main()
{
    int a =10;
    int *p = (int *)&a;
    *p = *p + 1;
    printf("Value at pointer p = %9d\nValue of a         = %9d\n",*p, a);
    printf("Value of pointer p = %9u\nAddress of a       = %9u\n",(unsigned int)p,(unsigned int)&a);
    return 0;
}
statement executed at the terminal: