study 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 […]

Pointers in C Languagelearn c language,study c language,c language tutorial

Introduction, declaration,  applications, 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 using pointers. So it becomes necessary to learn pointers to become a perfect C programmer. Let’s start learning them in simple […]

Notion of order of complexity in C Language

Asymptotic Notation Asymptotic complexity is a way of expressing the cost of an algorithm using idealized units of computational work. In order to choose the best algorithm for a task many factors, like how long will it take for an algorithm to run or how much memory will be taken by the algorithm during running, […]

1 5 6 7 8 9 12