Recursion Concept with Example

What is recursion and how to use recursion in programming. If you are new to programming, then recursion concept is tough to understand. In this post, i’ll explain the concept of recursion with example.

What is Recursion ?

In Recursion, function call itself repeatedly, until the base or terminating condition is not true. To understand this statement let’s take an example.

Suppose, we have to print a number between start to end range. Let’s print number between 1 to 10.

It’s a much preferred way to write cleaner and shorter code for many complex problems.

Through recursion, you can reduce complex problem into smaller version.

How to check system configuration on Ubuntu using command


How to check the system configuration on Ubuntu 12.04 using terminal command.

I am using Ubuntu 12.04 but the command i am going to write it’s working on previous version also.
If you are new to Ubuntu then you find difficulty to check the system configuration of Ubuntu.

How to check

Open the terminal and write the folowing command

cat  /proc/meminfo

cat  /proc/cpuinfo



It will show all the information. If you want specific thing to show like if you want to check only the Model then use the command written below.

cat /proc/cpuinfo | grep -i ‘Model’

It will show information like this


model        : 42
model name    : Intel(R) Pentium(R) CPU G630 @ 2.70GHz
model        : 42
model name    : Intel(R) Pentium(R) CPU G630 @ 2.70GHz

How to extract .rar files in ubuntu/Linux



Extract .RAR files in Ubuntu



While working on ubuntu i tried to extract .rar file but it failed to extract and shows the error that archive type not supported.

So how to extract .rar files on Linux

Go to terminal and type following command

sudo apt-get install unrar 


After installing unrar on your system right click on rar file and extract them it will easily extract there.

Extract .RAR file in linux