C programming language. C programming language C language c


These tutorials are for everyone, whether you're new to programming or have extensive programming experience in other languages! This material is for those who want to learn the C/C++ languages ​​from its very basics to the most complex structures.

C++ is a programming language, knowledge of this programming language will allow you to control your computer at the highest level. Ideally, you will be able to make the computer do whatever you want. Our site will help you master the C++ programming language.

Installation /IDE

The very first thing you should do before you start learning C++ is to make sure that you have an IDE - an integrated development environment (the program in which you will program). If you don't have an IDE, then here you go. Once you decide on the choice of IDE, install it and practice creating simple projects.

Introduction to C++

The C++ language is a set of commands that tell the computer what to do. This set of commands is usually called source code or simply code. Commands are either “functions” or “keywords”. Keywords (C/C++ reserved words) are the basic building blocks of the language. Functions are complex building blocks because they are written in terms of simpler functions - you'll see this in our very first program, which is shown below. This structure of functions resembles the contents of a book. The content can show the chapters of the book, each chapter in the book can have its own content consisting of paragraphs, each paragraph can have its own subparagraphs. Although C++ provides many common functions and reserved words that you can use, there is still a need to write your own functions.

What part of the program does it start at? Each program in C++ has one function, it is called the main or main function, program execution begins with this function. From the main function, you can also call any other functions, whether they are ones we wrote or, as mentioned earlier, provided by the compiler.

So how do you access these Standard Features? To access the standard functions that come with the compiler, you need to include the header file using the preprocessor directive - #include . Why is this effective? Let's look at an example of a working program:

#include << "Моя первая программа на С++\n"; cin.get(); }

Let us consider in detail the elements of the program. #include is a "preprocessor" directive that tells the compiler to put the code from the iostream header file into our program before creating the executable. By connecting a header file to a program, you get access to many different functions that you can use in your program. For example, the cout operator requires iostream . Line using namespace std; tells the compiler to use a group of functions that are part of the std standard library. This line also allows the program to use operators such as cout . The semicolon is part of C++ syntax. It tells the compiler that this is the end of the command. You'll see in a moment that semicolons are used to terminate most commands in C++.

The next important line of the program is int main(). This line tells the compiler that there is a function called main and that the function returns an integer. Curly braces ( and ) signal the start (and end) of a function. Curly braces are also used in other blocks of code, but they always indicate one thing - the beginning and end of the block, respectively.

In C++, the cout object is used to display text (pronounced "C out"). He uses symbols<< , известные как «оператор сдвига», чтобы указать, что отправляется к выводу на экран. Результатом вызова функции cout << является отображение текста на экране. Последовательность \n фактически рассматривается как единый символ, который обозначает новую строку (мы поговорим об этом позже более подробно). Символ \n перемещает курсор на экране на следующую строку. Опять же, обратите внимание на точку с запятой, её добавляют в конец, после каждого оператора С++.

The next command is cin.get() . This is another function call that reads data from the input data stream and waits for the ENTER key to be pressed. This command keeps the console window from closing until the ENTER key is pressed. This gives you time to see the output of the program.

Upon reaching the end of the main function (the closing curly brace), our program will return the value 0 to the operating system. This return value is important because by analyzing it, the OS can judge whether our program completed successfully or not. A return value of 0 means success and is returned automatically (but only for the int data type; other functions require you to manually return the value), but if we wanted to return something else, such as 1, we would have to do it manually.

#include using namespace std; int main() ( cout<<"Моя первая программа на С++\n"; cin.get(); return 1; }

To consolidate the material, type the program code into your IDE and run it. Once the program has run and you've seen the output, experiment a little with the cout statement. This will help you get used to the language.

Be sure to comment on your programs!

Add comments to your code to make it clearer not only for yourself but also for others. The compiler ignores comments when executing code, allowing you to use any number of comments to describe the actual code. To create a comment, use or // , which tells the compiler that the rest of the line is a comment, or /* and then */ . When you're learning to program, it's useful to be able to comment on parts of the code to see how the output of the program changes. You can read in detail about the commenting technique.

What to do with all these types of variables?

Sometimes it can be confusing to have multiple variable types when some variable types seem to be redundant. It is very important to use the correct variable type, as some variables require more memory than others. Additionally, due to the way they are stored in memory, floating point numbers, the float and double data types are "imprecise" and should not be used when a precise integer value needs to be stored.

Declaring Variables in C++

To declare a variable, use the syntax type<имя>; . Here are some examples of variable declarations:

Int num; char character; float num_float;

It is permissible to declare several variables of the same type on one line; to do this, each of them must be separated by a comma.

Int x, y, z, d;

If you've looked closely, you may have seen that a variable declaration is always followed by a semicolon. You can learn more about the convention “on naming variables”.

Common mistakes when declaring variables in C++

If you try to use a variable that is not declared, your program will not compile and you will receive an error message. In C++, all language keywords, all functions, and all variables are case sensitive.

Using Variables

So now you know how to declare a variable. Here is an example program demonstrating the use of a variable:

#include using namespace std; int main() ( int number; cout<< "Введите число: "; cin >>number; cin.ignore(); cout<< "Вы ввели: "<< number <<"\n"; cin.get(); }

Let's take a look at this program and examine its code, line by line. The keyword int indicates that number is an integer. The cin >> function reads the value into number , the user must press enter after the entered number. cin.ignore() is a function that reads a character and ignores it. We have organized our input into the program; after entering a number, we press the ENTER key, a symbol that is also transmitted to the input stream. We don't need it, so we discard it. Keep in mind that the variable was declared as an integer type, if the user tries to enter a decimal number, it will be truncated (that is, the decimal part of the number will be ignored). Try entering a decimal number or a sequence of characters, when you run the example program, the answer will depend on the input value.

Note that when printing from a variable, quotes are not used. The absence of quotes tells the compiler that there is a variable, and therefore that the program should check the value of the variable in order to replace the variable name with its value at execution. Multiple shift statements on the same line are perfectly acceptable and the output will be done in the same order. You should separate string literals (strings enclosed in quotes) and variables, giving each its own shift operator<< . Попытка поставить две переменные вместе с одним оператором сдвига << выдаст сообщение об ошибке . Не забудьте поставить точку с запятой. Если вы забыли про точку с запятой, компилятор выдаст вам сообщение об ошибке при попытке скомпилировать программу.

Changing and comparing values

Of course, no matter what type of data you're using, variables aren't very interesting without the ability to change their value. The following shows some operators used in conjunction with variables:

  • * multiplication,
  • - subtraction,
  • + addition,
  • / division,
  • = assignment,
  • == equality,
  • >more
  • < меньше.
  • != unequal
  • >= greater than or equal to
  • <= меньше или равно

Operators that perform mathematical functions must be used to the right of the assignment sign in order to assign the result to the variable on the left.

Here are some examples:

A = 4 * 6; // use line comment and semicolon, a is equal to 24 a = a + 5; // equal to the sum of the original value and five a == 5 // does not assign five, checks whether it is equal to 5 or not

You'll often use == in constructs such as conditional statements and loops.

A< 5 // Проверка, a менее пяти? a >5 // Check, is a more than five? a == 5 // Checking, is a equal to five? a != 5 // Check, is it not equal to five? a >= 5 // Check if a is greater than or equal to five? a<= 5 // Проверка, a меньше или равно пяти?

These examples don't show the use of comparison signs very clearly, but when we start studying selection operators, you'll understand why this is necessary.

C programming language developed by Dennis Ritchie in the early 1970s to create the UNIX operating system. C remains the most widely used language for writing system software, and C is also used for writing applications. Programming for beginners.

Peculiarities

The C programming language has the following main features:

  • Focus on the procedural programming paradigm, with the convenience of programming in a structured style, is a good plus to learn C.
  • Access to the hardware level through the use of pointers to designate memory locations.
  • Parameters are always passed to a function by value, not by reference.
  • Scope of lexical variables (but does not support closures or functions defined inside other functions.)
  • A standard set of library programs that provide features that are useful but not strictly necessary.
  • Use of the language preprocessor, C preprocessor, for tasks such as defining macros and including multiple source code files.
  • "O" performance for all operators

The functionality of the C programming language is guaranteed by ANS/ISO C99 C89/90 and regulations that explicitly state when the compiler (or environment) issues diagnostics. Programming for dummies. The documents also indicate what behavior can be expected from code written in the C programming language that conforms to the standard.
For example, the following code, according to the standard, produces undefined behavior.

#include #include int main (void) ( char *s = "Hello World!\\n"; strcpy (s, s+1); /* probably the programmer wanted to remove the first character from the string S = S +1, */ return 0; )

Note: The style of indentation in program code varies depending on the preferences of programmers. See indentation style for more information in the programming basics section.
"Undefined behavior" means that as a result the program may do anything, including working as the programmer intended, or producing fatal errors every time it is run, or causing single crashes only every time the forty-second run of the program occurs, or causing crashes when the computer reboots, etc., ad infinitum.
Some compilers do not adhere to any of the standards in the default mode, which results in many programs being written that will only compile with a certain version of the compiler and on a certain platform (Windows, Linux or Mac).
Any program written only in the standard C programming language will compile unchanged on any platform that has appropriate C compiler implementations.
Although C is commonly called a high-level language, it is only a "high-level" language compared to assembly language, but is significantly lower level than most other programming languages. But unlike most, it gives the programmer the ability to completely control the contents of the computer's memory. C does not provide tools for array bounds checking or automatic garbage collection.
Memory management guidance provides the programmer with greater freedom to tune program performance, which is especially important for programs such as device drivers. However, it also makes it easy to accidentally create code with errors resulting from erroneous memory operations such as buffer overflows. Several tools have been created to help programmers avoid these errors, including libraries for performing array bounds checking and garbage collection, and source code inspection libraries. The deliberate use of programs written in C from scratch and containing a buffer overflow mechanism is very common in many computer viruses and is very popular among hackers who develop computer worms.
Some of the identified shortcomings of C were considered and taken into account in new programming languages ​​derived from C. The Cyclone programming language has features to protect against erroneous memory operations. C++ and Objective C provide constructs designed to facilitate object-oriented programming. Java and C# added object-oriented programming constructs as well as higher levels of abstraction such as automatic memory management.

Story
The initial development of C occurred between 1969 and 1973 (according to Ritchie, the most turbulent period in 1972). It was called "C" because many of the features were derived from a predecessor language called B, which itself was named Bon after Bonnie Ken Thompson's wife.
By 1973, the C programming language had become powerful enough that most of the kernel from the Unix operating system was rewritten in C In comparison, the Multics operating system is implemented in the A language, Tripos OS (implemented in the BCPL language. In 1978, Ritchie and Brian Kernighan published the "C Programming Language" (the so-called "white paper", or K&R.) for many years , this book served as a specification for the language, and even today, this edition is very popular as a manual and textbook.
C became very popular outside of Bell Labs from the 1980s, and was for a time the dominant language in microcomputer programming systems and applications. It is still the most commonly used system programming language, and is one of the most commonly used programming languages ​​in computers for science education.
In the late 1980s, Bjarne Stroustrup and others at Bell Labs worked to add object-oriented constructs to C. The language they developed along with the first Cfront compiler was called C++ (which avoids the question of what a successor to "B" " and "C" must be "D" or "P"). Currently, C++ is the language most often used for commercial applications on the Microsoft Windows operating system, although C remains very popular in the Unix world.

Versions C

K&R C (Kernighan and Ritchie C)
C has evolved continuously since its inception at Bell Labs. In 1978, the first edition of Kernighan and Ritchie's The C Programming Language was published. It introduced the following features for existing versions of C:

  • structure data type
  • long int data type
  • unsigned int data type
  • The =+ operator was changed to += , and so on (since the =+ operator kept causing lexical analyzer errors in C).

For several years, the first edition of "The C Programming Language" was widely used as the de facto language specification. The version of C described in this book is generally referred to as "K&R C" (The Second Edition covers the ANSI C standard, described below.)
K&R C is often considered the core part of the language that is needed for a C compiler. Since not all compilers currently in use have been updated to fully support ANSI C in its entirety, and reasonably well-written K&R C code is also correct from an ANSI standpoint. C. Therefore, K&R C is considered the lowest common denominator that programmers should adhere to to achieve maximum portability. For example, the bootstrap version of the GCC compiler, xgcc, is written in K&R C. This is because many of the platforms supported by GCC did not have a proper ANSI C GCC compiler, so only one basic implementation of K&R C was written .
However, ANSI C is now supported by almost all widely used compilers. Most C code is now written from scratch only to take advantage of language features that go beyond the scope of the original K&R specification.

ANSI C and ISO C
In 1989, C was first officially standardized by ANSI in ANSI X3.159-1989 "The C Programming Language". One of the goals of ANSI C was to create an enhanced K&R C. However, the standards committee also included several new features that introduced many innovations than had typically occurred in programming when standardizing the language.
Some of the new features were "unofficially" added to the language after the publication of K&R, but before the start of the ANSI C process. These include:

  • void functions
  • functions returning struct or union data types
  • void * data type
  • const qualifier to make an object read-only
  • struct field names into a separate namespace for each structure type
  • memory allocation for struct data types
  • stdio library and some other standard library functions became available in most implementations (it already existed, well at least one implementation at the time of K&R C's creation, but it was not really a standard, and therefore was not documented in the book )
  • stddef.h header file and a number of other standard header files.

Several functions were added to C during the ANSI standardization process, most notably function prototypes (borrowed from C++). ANSI C also established a standard set of library functions.
The C programming language according to the ANSI standard, with minor modifications, was adopted as an ISO standard under ISO 9899. The first ISO edition of this document was published in 1990 (ISO 9899:1990).

C 99
Following the ANSI standardization process, the C language specification has remained relatively unchanged for some time, while C++ has continued to evolve. (In fact, Regulatory Amendment 1 created a new version of the C language in 1995, but this version is rarely recognized.) However, the standards were revised in the late 1990s, leading to the creation of ISO 9899:1999, which was published in 1999 year. This standard is commonly referred to as "C99". It was adopted as an ANSI standard in March 2000.
New features added in C99 include:

  • built-in functions
  • releasing the constraint on variable declaration location (as per C++)
  • In addition to several new data types, including long long int (to reduce the problems associated with the transition from 32-bit to 64-bit processors looming over many older programs, which predicted the obsolescence of the x86 architecture), an explicit Boolean data type, and a type representing complex numbers
  • variable length arrays
  • Official support for comments starting with "/ /" as in C++ (which many C89 compilers already supported as a non-ANSI extension)
  • several new library functions, including snprintf
  • several new header files, including stdint.h

Interest in supporting new C99 features is mixed. Although GCC and several commercial compilers support most of the new features of C99, compilers made by Microsoft and Borland do not, and those two companies do not seem interested in adding such support.

Program "Hello, World!" in C language
The following simple application outputs "Hello, World" to standard output (usually the screen, but could be a file or some other hardware device). This program change appeared first on K&R.

#include int main(void) ( printf("Hello, World!\\n"); //comment return 0; /* comment on several lines */ )

Typically, text that is not a program, but serves as a hint for the programmer, is written as a comment. // single-line or /* multi-line*/

Anatomy of a C Program
A C program consists of functions and variables. C functions as Fortran subroutines and functions or Pascal procedures and functions. The peculiarity of the main function is that the program begins execution with the main function. This means that every C program must have a main function.
The main function typically calls other functions that help do its job, such as printf in the example above. The programmer can write some of these functions, and others can be called from the library. In the above example, return 0 gives the return value for the main functions. This indicates successful execution of the program to call the program shell.
A C function consists of a return type, a name, a list of parameters (or void in parentheses if there are none), and a function body. The body function syntax is equivalent to the compound operator.

Control structures

Compound Operators
Compound operators in C are of the form
{ }
and are used as the body of a function and in places where multiple actions are expected in one block.

Declaration operator
Type statement
;
is the expression of the declaration. If there is no expression, then such a statement is called an empty statement.

Selection operator
C has three types of selection statement: two types if and switch statement.
Two types of if,
if()
{
}
or
if()
{
}
else
{
}
In an if declaration, if the expression in parentheses is nonzero or true, then control passes to the statement following the if . If there is an else in the clause, then control will pass to the next set of actions after the else if the expression in parentheses is null or false.
Switch control statement - in this case, it is necessary to list several values ​​that the variable that is used as a selection variable can take, which must have an integer type. For each value of a choice variable, several actions can be performed that are selected. Each action branch can be marked with a case tag, which looks like the keyword case followed by a constant expression and then a colon (:). No values ​​associated with switch constants can have the same value. There can also be at most one default label associated with swith; control is transferred to the default label if none of the constant values ​​match the selection variable, which is in parentheses after switch . In the example below, if there is a match between the selection variable and the constant, then the set of actions following the colon will be executed

Switch () ( case: printf(); break; case: printf(); break; default: )

Repetitions (Cycles)
C has three forms of loop operators:

Do ( ) while (); while () ( ) for (; ;) ( )

In while and do statements, the body is executed repeatedly as long as the value of the expression remains nonzero or true. For while, the condition is checked every time before execution starts; for do, the condition is checked after the loop body is executed.
If all three expressions are present in the for statement

For (e1; e2; e3) s;

then this is equivalent to

E1; while (e2) ( s; e3; )

Any of the three expressions in the for loop statement can be omitted. The absence of a second expression makes the while condition test always non-null, creating an infinite loop.

Jump Operators
Unconditional jump operator. There are four types of jump statements in C: goto, continue, break, and return.
The goto statement looks like this:
goto<метка>;
The identifier must point to a label located in the current function. Control is transferred to the marked operator.
The continue statement can only appear within a loop iteration and forces the remaining steps to be skipped at the current location and proceed to the next step of the loop. That is, in each of the statements

While (expression) ( /* ... */ continue; ) do ( /* ... */ continue ; ) while (expression); for (optional-expr; optexp2; optexp3) ( /* ... */ continue ; )

The break statement is used to exit a for, while, do, or switch loop. Control is transferred to the operator following the one in which the action was interrupted.
The function returns to the location from which the value was called using the return statement. Return is followed by an expression whose value is returned to the place from which it was called. If a function does not contain a return statement, then it is equivalent to return without an expression. In any case, the return value is undefined.
Operator Application Order in C89

  • () ->. + + - (CAST) Postfix operators
  • + + - * & ~! + - SizeOf unary operators
  • * /% Multiplicative Operators
  • + - Additive operators
  • << >> Shift operators
  • < <= >>= Relational operators
  • =! == Equality operators
  • & Bitwise and
  • ^ Bitwise XOR
  • | Bitwise inclusive, or
  • & & Logical and
  • | | Logical or
  • ?: Conditional operator
  • = += -= *= /= %= <<= >>=
  • & = | = ^ Assignment operators =
  • , Comma operator

Data Declaration
Elementary data types
Values ​​in And header files define the ranges of the main data types. The float , double , and long double type ranges are generally mentioned in the IEEE 754 standard.

Arrays
If a variable is declared using square brackets () together with the indication, then an array is considered to be declared. Strings are arrays of characters. They end with a null character (represented in C as "\0", the null character).
Examples:
int myvector ;
char mystring ;
float mymatrix = (2.0 , 10.0, 20.0, 123.0, 1.0, 1.0)
char lexicon ; /* 10000 lines, each of which can contain a maximum of 300 characters. */
int a;
The last example creates an array of arrays, but can be treated as a multidimensional array for most purposes. To access the 12 int values ​​of array "a", you can use the following call:

a a a a
a a a a
a a a a

Signposts
If a variable is preceded by an asterisk (*) in its declaration, then it becomes a pointer.
Examples:
int *pi; /* pointer to integer */
int *api; /* array of pointers of integer type */
char **argv; pointer to pointer to char */

The value in the address is stored in a pointer variable and can be accessed in the program by calling the pointer variable with an asterisk. For example, if the first statement in the example above, *pi is an int . This is called "dereferencing" the pointer.
Another operator, & (ampersand), called the address-operator, returns the address of a variable, array, or function. So, with the above in mind
int i, *pi; /* declare an integer and a pointer to an integer */
pi =

I and *pi can be used interchangeably (at least until pi is set to something else).

Strings
To work with strings you do not need to include the library, because in the standard library C, functions are already present to process strings and blocks of data as if they were char arrays.

The most important string functions:

  • strcat(dest, source) - adds the string source to the end of the string dest
  • strchr(s, c) - finds the first turn of character c into string s and returns a pointer to it or a null pointer if c is not found
  • strcmp(a, b) - compares strings and a b (lexical order); returns negative if a b is less, 0 if equal, positive if greater.
  • strcpy(dest, source) - copies the string source to the string dest
  • strlen(st) - returns the length of the string st
  • strncat(dest, source, n) - adds a maximum of n characters from the source string to the end of the dest string; characters after the null character are not copied.
  • strncmp(a, b, n) - compares a maximum of n characters from the string and a b (lexical order); returns negative if a b is less, 0 if equal, positive if greater.
  • strncpy(dest, source, n) - copies a maximum of n characters from the source string to the dest string
  • strrchr(s, c) - finds the last instance of character c in string s and returns a pointer to it or a null pointer if c is not found

Less important string functions:

  • strcoll(s1, s2) - compare two strings according to the locale of the ordered sequence
  • strcspn(s1, s2) - returns the index of the first character in s1 , which matches any character in s2
  • strerror(err) - returns a string with an error message corresponding to the code in err
  • strpbrk(s1, s2) - returns a pointer to the first character in s1 that matches any character in s2, or a null pointer if not found
  • strspn(s1, s2) - returns the index of the first character in s1 that matches the non-character in s2
  • strstr(st, subst) - returns a pointer to the first occurrence of the string subst in st, or a null pointer if no such substring exists.
  • strtok(s1, s2) - returns a pointer to the token in s1 separated by characters in s2.
  • strxfrm(s1, s2, n) - converts s2 to s1 using the rules locale

File I/O In the C programming language, input and output are accomplished through a group of functions in the standard library. In ANSI/ISO C, those functions that are defined in header.
Three standard I/O streams
stdin standard input
stdout standard output
stderr standard error

These streams are automatically opened and closed by the runtime; they do not need to be opened explicitly.
The following example shows how a typical program for filtering letters is structured:

//Header files, for example, #include

Passing arguments to the command line
The parameters presented on the command line are passed to the C program with two predefined variables - the number of command line arguments is stored in the argc variable, and the individual arguments are stored as character arrays in the array pointer argv. So launch the program from the command line in the form
Myprog p1 p2 p3
will give results similar to (note: there is no guarantee that individual rows are contiguous):
Individual parameter values ​​can be accessed using argv , argv , or argv .

C libraries
Many features of the C language are provided by the C standard library. The "hosted" implementation provides all C libraries. (Most implementations are hosted, but some are not intended for use with the operating system). Access to the library is achieved, among other things, by standard headers through the #include preprocessor directive. See ANSI C standard libraries, GCC (GNU C Compiler).

The C programming language (pronounced "C") can be described as universal, economical, with a full set of operators, with modern control flow. This language cannot be called a “large” language, nor does it claim to be a “high-level language”; it was not created for any specific tasks; on the contrary, they tried to make it as efficient as possible for any application. This interesting fusion of ideas put into the C programming language has made it very convenient and more effective for a wide range of problems than other, perhaps even more advanced languages.

The connection between “C” and the UNIX OS is very close, since this language developed along with “UNIX” and most of the software for this system is written in it. At the same time, C is sometimes called a language because it is believed that it is convenient to create operating systems with its help; in fact, database processing programs and games can be written in it with the same success.

C is a low-level programming language, but you shouldn’t think that this is bad; in fact, it simply operates with the same objects that any computer constantly works with, with symbols, addresses and numbers. In this case, all objects are combined, compared or subtracted using ordinary logical and arithmetic operations familiar to computers.

Although functions for working with composite objects are becoming the norm in the coding world and are built into all modern programming languages, C, unlike others, cannot work with objects such as a string, list, array or set. It has no analogues to PL/1 operations on entire strings and arrays.

C works with memory using a stack and statistical definition; C has no other memory management capabilities; you will not find a “heap” or “garbage collection” in it, as Pascal or Algol 68 can do.

And even the most basic mechanisms, input/output, are not provided by the C language; you will not find Read and Write operators in it; there are also no built-in functions for working with the file system. Such high-level operations are provided using plug-in libraries.

Also, the C programming language will refuse to work if you need multiprogramming, synchronization, parallel operations, etc. It contains the capabilities exclusively for simple and sequential work, its element: cycles, checks, grouping and subroutines.

Some may be surprised by such a stinginess of funds provided to programmers (“why do I have to call a function every time I need to compare a couple of strings!”), but on the other hand, it is precisely thanks to such savings in funds that programs written in C get a real speed advantage.

On the other hand, a small number of operators reduces the time required to memorize them, and you will only need a few pages to cover them all. And as practice shows, a compiler with “C” is a compact tool that is quite easy to write. If you use modern tools, a compiler for a completely new computer will be ready in just a couple of months, despite the fact that 80% of its code will be similar to the code of previous versions. Due to this feature, the C programming language is considered very mobile. And its effectiveness is such that it simply doesn’t make sense to write any programs that are performance-critical in assembler, as was previously the case. The best example of this is the UNIX OS itself, which is 90% written in and for C, almost entirely created by numerous programmers in this same wonderful language, which is currently considered the number one programming language in the world.

Here are more than 200 free lessons on programming in C++. Online programming courses from scratch for beginners, which cover the basics and intricacies of the C++ programming language. Free programming training, namely a textbook with practical tasks and tests. Whether you're experienced or not, these programming lessons will help you get started creating, compiling, and debugging C++ programs in a variety of development environments: Visual Studio, Code::Blocks, Xcode, or Eclipse.

Lots of examples and detailed explanations. Perfect for both beginners (dummies) and more advanced ones. Everything is explained from scratch to the very details and it’s all absolutely free!

It also covers step-by-step game creation in C++, the SFML graphics library, and more than 70 tasks to test your programming skills. An additional bonus is.

Chapter No. 0. Introduction. Beginning of work

Chapter No. 1. C++ Basics

Chapter No. 2. Variables and basic data types in C++

Chapter No. 3. Operators in C++

Chapter No. 4. Scope and other types of variables in C++

Chapter No. 5. The order in which code is executed in a program. Loops and branches in C++







2024 gtavrl.ru.