Month: September 2008

Working with Pointers in C

A pointer is a variable that represents the location of a data item, such as a variable or an array element. Pointers are used frequently in C, as they have a number of useful applications. For example, pointers can be used to pass information back and forth between a function and its reference point. Pointers provide a way to return multiple data items from a function via function arguments to
be specified as arguments to a given function.

Read More

Constructors in C++

A constructor is a special method that is created when the object is created or defined. This particular method holds the same name as that of the object and it initializes the instance of the object whenever that object is created. The constructor also usually holds the initialization of the different declared member variables of its object.

Read More

Functions in C Programming

Function groups a number of program statements into a unit and gives it a name. This unit can be invoked from other parts of a program. A computer program cannot handle all the tasks by it self. Instead its requests other program like entities – called functions in C – to get its tasks done. A function is a self contained, named block of statements that perform a coherent task of same kind.

Read More

Input and Output in C: Stream Functions

The standard way of handling all input and output is done with streams in C programming regardless of where input is coming from or where output is going to. This approach has definite advantages for the programmer. A library package has been evolved which is known as known as the Standard I/O Library which is used in any C program by using stdio.h header. First, however, we need to understand exactly what the terms input and output mean in context of C.

Read More