Skip to main content

Posts

Showing posts from May, 2017

Calculator in C++

A simple program of addition in C with explanation

How to compile C program in Linux

Although it is super easy to print "Hello World!" in c program, you might wondering if you've switched to linux first time. Here is the step by step process to compile and run a c program in linux. 1. Open terminal: (CTRL+ALT+T) Terminal in Ubuntu 14.04 LTS 2. Change directory to desired location: cd DIRECTORY-NAME 3. Open your file in any text editor: Here I am using vim editor. 4. Vim will look something like this 5. Press "i" for go to insert mode 6. Type a "C" program 7. Press "escape" button then ":wq":  Here escape key is used for go to command mode, :w for save, and q for quit. For more about vim commands you can visit  here . 8. Now its time to compile the program with  GNU  compiler: Type "gcc" followed by C program you just typed. Hit enter. If there would by any error in your program it will be displayed. Go back to step 3 and fix them. 9. If a new line display...

Five reasons why I prefer Linux over Windows

1. Free and open-source I do not need to spend $200 for my os, neither have any guilt feeling of using pirated OS. I royally use linux which is completly free (most distributions) and open source. Also I got full control on my device, which is not possible with windows. 2. Control everything with terminal There is no need to hover mouse here and there and look for desired option every time. Although there is command line interface is available in windows too, but it is less robust than linux terminal. I can accomplish any task without leaving my terminal, whether it is to send emails, play videos, change passwords, add/remove new users, connect/disconnect to a network, live chat (irc), shutdown/restart or thousands of other works. 3. Portable Linux can also be installed in a usb and use it in any system without need of installing linux in that system. 4. Light weight Linux consumes very little space in comparison with windows. You got extra space f...

Five Linux apps for increase productivity

My list of top 5 linux apps 1. LibreOffice libreoffice 4.8.2.2 LibreOffice is the best alternative of Microsoft Office on linux platform. Its free and open source, also available for Windows & Mac. 2. Geany geany 1.30.1 If you are looking for a text-editor with rich features like notepad++ then  geany  is here for you. 3. Gimp Image Editor gimp 2.8.10 Gimp  is a free and open source image editor with a lots of features. It is also available for Windows and Mac. A light weight application alternative of Adobe Photoshop. 4. Kdenlive kdenlive 0.9.6 If you need a video editor with some next level functions then you should check  kdenlive . It is packed with a lot of advance features. 5. Handbrake handbrake For encoding videos into one format to another, I find this app very useful. This too is open source and available for multiple platforms.