Category: C Programming: Different Articles on C Programming

Union in C Programming

A union in C programming is a user defined data type which may hold members of different sizes and type. Union uses a single memory location to hold more than one variables. However, only one of its members can be accessed at a time and all other members will contain garbage values. A structure is a convenient tool for handling a group of logically related data items. Structure help to organize complex data is a more meaningful way. It is powerful concept that we may after need to use in our program Design.

Read More

Basic Data Types in C Programming

C language provides a standard and minimal set of basic data types. Sometimes these are called primitive data types. More complex data structures can be built up from these basic data types. Data types specify how we enter data into our C programs and what type of data we use for different operations. C has some predefined set of data types to handle various kinds of data that we can use in our program.

Read More

Learn File Handling Concepts in C Programming

This article is about file handling using C programming language. File stores information for many purposes and retrieve whenever required by our C programs. A file represents a sequence of bytes on the disk where a group of related data is stored. File is created for permanent storage of data. C programming language can handle files as Stream-oriented data (Text) files and System oriented data (Binary) files.

Read More

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

Graphics in C Language

In a C program, first step is to initialize the graphics drivers on the computer. This is done using the initgraph() method provided in graphics.h  library. In the next few pages we will discuss graphics.h library in more details. Important functions in graphic.h  library will be discussed in details and samples programs will be provided to show the power of C programming language especially for graphic programming developing graphical user interfaces.

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

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