in C. see this code to
In C. see this with java code example