Solution for N Queens Problem using Backtracking in C

What is N Queens Problem? The N Queens problem is: How can N queens be placed on an NxN chessboard so that no two of them attack each other? The eight queens puzzle is the problem of placing eight chess queens on an n x n chessboard so that no two queens threaten each other. Thus, a solution requires that no two […]

Read More

C Program to Print Map of India

Today I’m going to be little proud as I’m ready to write a C program to print map of India. This program is little complicated and in the end I’m going to share the logic behind the code.   This will be our output:   Now let’s write the program.   C program to print map […]

Read More

Tower of Hanoi in C

What is Tower of Hanoi? All must be well aware of the problem of Tower of Hanoi, for those who don’t know, let’s discuss it once again. The Tower of Hanoi (also called the Tower of Brahma or Lucas’ Tower, and sometimes pluralized) is a mathematical game or puzzle. tower of hanoi   It consists […]

Read More

Pointers in C

What are Pointers in C programming language? Pointers are not exclusive to functions, but this seems a good place to introduce the pointer type.   Imagine that we have an int called i. Its address could be represented by the symbol &i. If the pointer is to be stored as a variable, it should be […]

Read More

Exceptions in Java

[ad_1] What is an Exception? An exception is an event, which occurs during the execution of a program i.e at run time, that disrupts the normal flow of the program’s instructions. When an error occurs in a method, the method creates an Object known as Exception Object and hands it off to the runTime system. […]

Read More

The Standard Input Output File in C

[ad_1] Standard Input Output File: UNIX supplies a standard package for performing input and output to files or the terminal. This contains most of the functions which will be introduced in this section, along with definitions of the datatypes required to use them. To use these facilities, your program must include these definitions by adding […]

Read More

File Handling in C (1)

[ad_1] File Handling in C This section describes the use of C’s input / output facilities for reading and writing files. There is also a brief description of string handling functions here. The functions are all variants on the forms of input / output which were introduced in the previous section. 1)UNIX File Redirection UNIX […]

Read More

File Handling in C (2)

[ad_1] For Part 1: File handling in C (1) 3)Input and Output using file pointers Having opened a file pointer, you will wish to use it for either input or output. C supplies a set of functions to allow you to do this. All are very similar to input and output functions that you have […]

Read More