c language tutorial

Simple Interest and Compound Interest Program in C

WAP that calculates the Simple Interest and Compound Interest. The Principal, Amount, Rate of Interest and Time are entered through the keyboard.

Marks Average Program in C Language

Marks Average Program in C Language

Hello World in Program in C

Hello World in C Language

Command line arguments in C Language

It is possible to pass some values from the command line to your C programs when they are executed. These values are called command line arguments and many times they are important for your program especially when you want to control your program from outside instead of hard coding those values inside the code. The […]

Defining and calling macros in C Language

A macro is a segment of code which is replaced by the value of macro. Macro is defined by #define directive. There are two types of macros: Object-like Macros Function-like Macros Object-like Macros The object-like macro is an identifier that is replaced by value. It is widely used to represent numeric constants. For example:    #define PI 3.14 […]

Standard C preprocessors in C Language

The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required pre-processing before the actual compilation. We’ll refer to the C Preprocessor as CPP. All preprocessor commands […]

File I/O functions in C Language

The last chapter explained the standard input and output devices handled by C programming language. This chapter cover how C programmers can create, open, close text or binary files for their data storage. A file represents a sequence of bytes, regardless of it being a text file or a binary file. C programming language provides […]

Notion of linked list (no implementation)

A linked list is a common data structure made of a chain of nodes in which each node contains a value and a pointer to the next node in the chain. The head pointer points to the first node, and the last element of the list points to null. When the list is empty, the […]

Use of pointers in self-referential structures in C Language

You can define pointers to structures in the same way as you define pointer to any other variable − struct Books *struct_pointer; Now, you can store the address of a structure variable in the above defined pointer variable. To find the address of a structure variable, place the ‘&’; operator before the structure’s name as […]

Dynamic memory allocation in C Language

This chapter explains dynamic memory management in C. The C programming language provides several functions for memory allocation and management. These functions can be found in the <stdlib.h> header file. Sr.No. Function & Description 1 void *calloc(int num, int size); This function allocates an array of num elements each of which size in bytes will […]

1 5 6 7 8 9 13