/c-tutorial

This repo has all resources and road map to c programming .

Primary LanguageC

C-tutorial

This repo has all resources and road map to c programming .

Road map of c language

getting started

1.History of the language : (https://www.section.io/engineering-education/history-of-c-programming-language/)

2.Scope of this language : (https://www.codeavail.com/blog/uses-of-c-programming-language/)

3.Road map of this language:

1)Introduction to C Programming : The course will first teach you about program flow and how programming languages work with data, so that you can understand the basic architecture behind programming with C. The course then moves on to the most important elements of programming in C. These will include overviews and explanations of how to use crucial C functions, methods and routines. All of this will be outlined in clear and simple language and gone through in a step-by-step manner.

2)Fundamentals of Numbers, Variables and Arrays : This course begins by discussing numbers, variables and arrays when programming in C. You will look into the basics of signed and unsigned numbers, the basics of numeric overflow, fractional numbers in binary, and numeric data types in C. You will also study the basics of ASCII and the char data type as well as learn how numbers are encoded as characters in ASCII. This course will also discuss the maximum values for unsigned integers in C and the minimum and maximum values of signed integers.

3)Using Pointers, Constants and Strings : C is a powerful system programming language and is commonly used to programme operating systems such as Unix. With this course, you will learn that one of the main advantages of programming in C is that it allows the programmer to write directly to memory. This means that key constructs such as pointers, constants, and strings can be used within the memory in an efficient and machine-independent fashion. You will also look into the functions of the char pointer.

4)Statements and Logic : This course begins by discussing statements and logic when programming in C. You will look into conditional flow statements and the mechanisms for control flow statements. You will learn that control flow is the order in which individual statements, instructions, or function cells are executed within a piece of software. You will also learn how to implement a simple IF statement in C and look into the other functions of the IF statements and logical operators.

5)Preprocessor in c : 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 begin with a hash symbol (#). It must be the first nonblank character, and for readability, a preprocessor directive should begin in the first column. The following section lists down all the important preprocessor directives.

6)Type casting in c : Converting one datatype into another is known as type casting or, type-conversion. 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 the cast .

7)Header files : 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 file in your program by including it with the C preprocessing directive #include, like you have seen inclusion of stdio.h header file, which comes along with your compiler.

Including a header file is equal to copying the content of the header file but we do not do it because it will be error-prone and it is not a good idea to copy the content of a header file in the source files, especially if we have multiple source files in a program.

A simple practice in C or C++ programs is that we keep all the constants, macros, system wide global variables, and function prototypes in the header files and include that header file wherever it is required.

8)Error handling : As such, C programming does not provide direct support for error handling but being a system programming language, it provides you access at lower level in the form of return values. Most of the C or even Unix function calls return -1 or NULL in case of any error and set an error code errno. It is set as a global variable and indicates an error occurred during any function call. You can find various error codes defined in <error.h> header file.

So a C programmer can check the returned values and can take appropriate action depending on the return value. It is a good practice, to set errno to 0 at the time of initializing a program. A value of 0 indicates that there is no error in the program.

9)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.

for more resources

👉🏻 https://alison.com/learning-path/c-programming

you tube tutorials

👉🏻 (https://youtu.be/Bz4MxDeEM6k)

👉🏻 (https://youtu.be/KJgsSFOSQv0)