Tag Archives: C program

Accessing private data members directly outside from its class in C++

Private members in C++ cannot be accessed from outside the class directly. In this post I will tell an interesting fact, that in C++ however there are means with which you can access/modify the values of the private members of … Continue reading

Posted in C Language, Computer Science | Tagged , , | 1 Comment

Input Strings with Blankspaces

In CLI programs getting input from the standard input is very important. Often we need to input strings from the user. Strings are delimited by newline, blankspace character and other characters as per the user interpretation. I am discussing on … Continue reading

Posted in C Language, Computer Science | Tagged , | 1 Comment

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

C Language Constructors and Destructors with GCC

Constructors and Destructors are special functions. These are one of the features provided by an Object Oriented Programming language. Constructors and Destructors are defined inside an object class. When an object is instantiated, ie. defined of or dynamically allocated of … Continue reading

Posted in C Language, Computer Science | Tagged , , | 5 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