Subscribe for email updates

Get all updates to your inbox to stay tune.

Curve tracing programs - Draw sin(x) curve using Graphics programming in C

Learn how to draw curve tracing graphics programs in c language

Graphics programming in C

Learn how to write basic and advanced graphics programming in c language

Curve tracing programs - Draw Cos(x) curve using Graphics programming in C

Learn how to draw curve tracing graphics programs in c language

Make file tutorial

A step by step guide to learn how to write make file in Linux with examples

Tuesday, May 14, 2013

Valgrind Tutorial - Memory Debugging tool memcheck



1.     Introduction

Developing any program/application that is free of defects is very important and really challenging. Code review, unit testing, integration testing, system testing, functional testing, etc are different steps in the development lifecycle that helps in detecting defects in software. As the system under development becomes more complex, covering all possible scenarios as part of testing may not be possible as it may be too costly. Similarly, reproducing the fault scenarios reported from the deployment site may not possible in a lab environment under simulation mode. In addition, there can also be other defects which are very difficult to identify and reproduce such as buffer overflow, memory corruption, memory leak etc. Identifying such issues manually takes lot of time and sometimes it is hard to find.




Monday, April 29, 2013

N Queens Puzzle Using C Graphics

N Queens puzzle is one of the most popular interview questions. The problem is to place N queens in NxN chessboard so that no queen should attack the other queen. This can be solved using backtracking technique. The logic is , Place one queen in each row, and proceed placing the next row queen and so on. If it is found that there is no place in the current row to place the queen the revisit the already placed queens, adjust their position and proceed to the same row. Repeat the same, until you place the queen in the last row. If the queen is successfully placed in the last row, it means that we arrived to a solution. There may be such multiple solutions. 

Wednesday, April 24, 2013

Bouncing Balls Program Using C Graphics

Drawing curves, animated programs in C Graphics is fun. This article shows a demo of "Bouncing Balls" Program using C Graphics. I have also provided the source code. The logic here is to draw a circle at given (x,y) point. For each step increase X and Y position. Do this in a loop it looks like a moving ball. To make the ball bounce when the ball crosses or hits any of the boundary of the screen, then add logic to reverse the direction. If ball hits right or left boundary reverse the direction of X step. If the ball crosses the bottom or top, then reverse the direction of Y. This program has two important macros using which the number of balls and speed of the animation can be controlled.




Thursday, April 18, 2013

Enable or Disable Gmail,Gtalk desktop notifications

Gmail/Gtalk desktop notification is a very useful feature to see the latest arrived message. But sometimes it may require that to disable this notification to maintain privacy. Lets see how to Enable or Disable Gmail, Gtalk desktop notifications.
Disable Gtalk notifications

Monday, April 8, 2013

Most useful Linux basic commands for beginners


Beginners must know the following most useful commands to start working on Linux. The basic linux commands can be categorized as file and Directory manipulation commands, Managing file permissions, File system commands, Find files and search strings commands, Manage users commands. Let us start this series with most basic file and directory manipulation commands with examples.