Latest stories

The C++ programming language

T

In the early 70’s appeared the C-language, developed by Dennis Ritchie and Brain Kernighan. The C ++ language is the creation of Bjarne Stroustrup and is an extension of the C language that allows programming on objects. Creating a C ++ written program requires four steps: 1. editing-writing the source program by creating a file with the cpp extension; 2. compile-it returns to the internal...

Command Line Parameters in the C language

C

CLI is an acronym for command-line interface or command line interpreter and represents a mechanism for interacting with a computer, operating system or software by introducing sequential, line-by-line commands. This interface, which is based only on text input, contrasts with graphical user interface (GUI) interactions, which use mouse devices to select options or menus. Entering commands via...

File operations in the C language

F

A file is a dynamic structure located in the secondary memory. The C language allows the following file operations: – like text – such a file contains a line of lines separated by a newline (‘\ n’) – by binary – such a file contains a sequence of bytes without any structure. Editing a file involves associating it with an I/E channel called stream or stream...

Coding style convention in C language

C

We will try to list the things you need to keep in mind when talking about conventions; then we will go through all the C language instructions and give examples. The code must be: 1. Clear and modular The code will be divided into components, so there is a logical separation (e.g., multiple files, more functions, etc.). Each elemental logic piece will be moved to a function (which allows reuse...

Pointers in the C language

P

A pointer is a variable that holds a memory address. In C, a pointer can represent: 1. The address of a given type – elementary type, structure, string, etc. – pointer operations are determined by the size of the type of data. 2. The address of a function – address where the current execution point will jump, if that function is called 3. The address of a memory address –...

Modular programming in C

M

Ever since its appearance in the early 1970s, C has become an unchallenged leader in system programming. The latter includes a large class of programs that interact very closely with the computer and whose performance affects everyone else. A typical example of such a program is the operating system. C has several qualities that make it so much appreciated by system programmers (and not only)...

Vectors in C language

V

When we refer to the notion of a vector, we mean a linear and homogeneous collection of data. A vector is linear because data (elements) can be accessed uniquely through an index. A vector is also homogeneous because all elements are of the same type. In C, the index is a positive integer, and the indexing is from 0. The statement of a vector variable is as follows: <element_type>...

Header files in C programming

H

Operations more often used in C programming are implemented in standard or predefined functions found in the standard C library. Prototypes of standard functions, as well as other types and symbolic statement statements required to use the functions, are found in header files. These are common text files with the .h extension (from the header) and are usually stored in \TC\INCLUDE. This directory...

Functions in C language

F

Functions divide complex tasks into small pieces easier to understand and program. These can be reused on other occasions, instead of being rewritten from scratch. Functions are also useful to hide the details of running certain parts of the program, helping it work. By using functions, which represent the fundamental execution unit of C programs, a logical division of large and complex programs...

Storage classes in C

S

The storage class (memory) shows when, how, and where memory is allocated for a variable (vector). Any variable C has a memory class that results either from an explicit statement or implicitly from where the variable is defined. The memory area used by a C program includes four sub-zones: 1. Text area: where the program code is stored. 2. Data area: where global variables are allocated. 3. Stack...

Recent Posts

Archives

Categories