Category: C

Union in C, Online Study

Union in C

Union in C Union in C A union is a special data type available in C that allows storing different data types in the same memory location. You can define a union with many members, but only one member can contain a value at any given time. Unions provide an efficient way of using the […]

Preprocessor in C, Online Study

Preprocessor in C

Preprocessor in C The Preprocessor in C 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 preprocessing before the actual compilation. We’ll refer to the C Preprocessor as CPP. […]

Header Files in C

Header Files in C Header Files in C a file with extension .h which contains C function declarations and macro definitions to be shaored between several source files. There are two types of header files: the files that the programmer writes and the files that comes with your compiler. Header Files in C You request […]

Memory Management, Learn Him Self

Memory Management 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. S.N. Function and Description 1 void *calloc(int num, int size); This function allocates an array of num elements each of which size in […]

Command Line Arguments

Command Line Arguments 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 […]

Type Casting in C

Type Casting in C Type casting is a way to convert a variable from one data type to another data type. For example, if you want to store a ‘long’ value into a simple integer, then you can type cast ‘long’ to ‘int’. You can convert the values from one type to another explicitly using […]

Header Files in C

Header Files in C A header file is a file with extension .h which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that comes with your compiler. You request to use a header […]

Structure in C, Online Study

Structures in C

Structures in C Structure in C Arrays allows defining type of variables that can hold several data items of the same kind. Similarly, the structure is another user-defined data type available in C that allows combining data items of different kinds. Structures are used to represent a record. Suppose you want to keep track of […]

Strings

Strings Strings are actually one-dimensional array of characters terminated by a null character ‘\0’. Thus a null-terminated string contains the characters that comprise the string followed by a null. The following declaration and initialization create a string consisting of the word “Hello”. To hold the null character at the end of the array, the size […]

Double Pointer in C, Pointer in C PDF

Double Pointer in C, Pointer in C PDF, Types of Pointer in C, Use of pointer in c, Learn Him self Pointers in C  Pointers in C are easy and fun to learn. Some C programming tasks are performed more easily with pointers, and other tasks, such as dynamic memory allocation, cannot be performed without […]