https://beginnersbook.com/2014/01/c-tutorial-for-beginners-with-examples/
C Tutorial – Learn C Programming with examples
Learning C programming is easy if you follow the tutorials in the given order and practice C programs along the way. This C tutorial is designed for beginners so you won’t face any difficulty even if you have no prior knowledge in C language.
C is a general purpose computer programming language. A general purpose language is a language that is widely used in various domains and not specific to a particular domain. C programming language was created in 1972 by Dennis Ritchie at AT&T bell laboratories in U.S.A.
Introduction to C
C is a very popular programming language because of the features it offers. Here are some of the features of C programming language.
1. Simple
C language is simple and easy to learn.
2. Portable
C is a machine independent language, which means a C program written one machine can run on another machine without requiring a code change.
3. Fast
C is a compiler based language and it supports only useful features which makes the compilation of C file fast.
4. Extensible
C program supports code modifications and addition of new code to the already existing programs, this makes C language extensible. It becomes easier to add new functionalities to the existing C programs.
5. Mid level programming language
C language provides the benefits of high level and low-level languages both. C allows manipulation of hardware just like low level language and allows high user end functionalities like high-level languages.
A simple C Program
#include <stdio.h>
int main() {
printf("Hello World!");
return 0;
}
Output:
Hello World!
C Tutorial
Learn and practice these tutorials in the given order.
Learn C Basics First
- History of C Language
- Features of C
- Turbo C++ installation: compile and run first C program – Installation guide for turbo C++. Also, refer this for getting to know the compilation and execution steps of a C program.
- First C Program – What all basic components work together to make a complete program. Learn little basics of C building blocks.
- C printf() and scanf() – C input/output functions.
- Variables in C
- Data Types in C
- Keywords in C – List of reserved words and their purpose for C language.
- C identifiers
- C comments
Decision Control Statements in C
- If statement – Basic usage, flow and examples of if statements.
- If-else statement – Use of If-else in a program. Flow diagram and examples.
- Switch-case – How to use switch-case statements in C and what’s the role of break while using this control structure.
Loops in C
- For loop – Examples, flow diagrams and use of for loop in C.
- while loop – A guide on While loop usage with flow diagrams and examples.
- dowhile loop – All about do-while loop along with differences between while and dowhile.
C – Loop control statements
- Break statement – How and where to use break statement in a C program.
- Continue statement – Its syntax, usage along with few C example programs.
- Goto statement – How to use goto in a program and why it should be avoided while developing an application in C.
Array Tutorials in C
- Arrays – Array basics.
- 2D array – How to implement and use a 2D array in program.
- Pointer to Array
- Passing array to function – Learn passing of an array to a function as an argument.
C – Strings
- C Strings and String functions – All about string and string functions. A complete guide.
- C strcat()
- C strncat()
- C strchr()
- C strcmp()
- C strncmp()
- C strcoll()
- C strcpy()
- C strncpy()
- C strrchr()
- C strspn()
- C strstr()
- C strcspn()
- C strlen()
Functions in C
- C functions – What’s the use of functions and how to implement them in a program.
- Function Call by value method – In the call by value method the actual arguments are copied to the formal arguments, hence any operation performed by function on arguments doesn’t affect actual parameters.
- Function Call by Reference method – Unlike call by value, in this method, address of actual arguments (or parameters) is passed to the formal parameters, which means any operation performed on formal parameters affects the value of actual parameters.
Structure
Structures in C – Complete guide for structures in C
Pointer in C Programming
- C Pointers – What are pointers and how to use them.
- Pointer to pointer – Tutorial on pointer to pointer (Double pointer).
- Function Pointers – All about function pointers
- Passing pointer to functions – Learn how to pass a pointer to a function.
File I/O
File I/O – Learn how to perform Input/Output operations on files in C. Also, get to know the handling of text/binary files in a program.
Operator Precedence table
Operator Precedence – Includes various types of operators in C.
No hay comentarios:
Publicar un comentario