Category Archives: Coding Discussions

Different programming problems, and its solutions discussed with source codes and explanations.

Allocating multidimentional array at runtime in C

Arrays in C language are static in nature, and cannot be resized at runtime. The effect of runtime allocation of an array could be achieved by hierarchically allocating blocks of memory at runtime. Below we discuss the mechanism to allocate … Continue reading

Posted in C Language, Coding Discussions, Computer Science | Tagged , | 2 Comments

Simpson’s 1/3rd Rule

A brief introduction to the Simpson’s 1/3rd rule and a uniform interval Composite Simpson’s 1/3rd Rule implementation.

Posted in Coding Discussions, Computer Science | Tagged , , | 1 Comment

Trapezoidal Rule

A brief introduction to the Trapezoidal rule and a uniform interval Composite Trapezoidal Rule implementation.

Posted in Coding Discussions, Computer Science | Tagged , , | 2 Comments

Balanced Parenthesis Check

Objective To check if an entered string containing nested parenthesis are balanced and valid. This write-up presents a function with which a string is checked for balanced parenthesis.

Posted in Coding Discussions, Computer Science | Tagged , | 2 Comments

GCD of n integers

Greatest Common Divisor Let a and b be integers, not both zero. The largest integer d such that d exactly divides both a and b is called the greatest common divisor of a and b . The GCD of the … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | Leave a comment

Sieve of Eratosthenes : A basic implementation

An basic implementation to generate prime numbers by the Sieve of Eratosthenes method. Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | 7 Comments

wcat : A GNU cat implementation

A home made implementation of the GNU cat command Continue reading

Posted in Coding Discussions, Computer Science | Tagged , | 2 Comments

An ID3v1 Tag Parsing Library

A small ID3v1 tag parsing library. Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , , | 2 Comments

Synchronization Safe Integer

Synchronization safe integers are related to ID3v2 tags. ID3v2 tags has a dynamic structure where the length of the tag is variable and inside the tag, there can stay a lot of frames which again can be of dynamic sizes. … Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | 1 Comment

Hero’s Method : Evaluating square root of a real number

A floating point number is given. the task is to evaluate the value of its square root. We will discuss how to find the square root of a real number in this post, and also present a C Language code which does this job. The value of the root will be evaluated with the Hero’s method. Continue reading

Posted in Coding Discussions, Computer Science | Tagged , , | 2 Comments