# What is C?
C is a general-purpose programming language created by Dennis Ritchie at the Bell Laboratories in 1972.
It is a very popular language, despite being old. The main reason for its popularity is because it is a fundamental language in the field of computer science.
C is strongly associated with UNIX, as it was developed to write the UNIX operating system.
# Why Learn C?
- one of the most popular programming language in the world
- similar syntax to other programming languages (Java, Python, C++, C#, …)
- C is very fast, compared to other programming languages, like Java and Python
- C is very versatile; it can be used in both applications and technologies
# Difference C vs C++
- C++ was developed as an extension of C - both have similar syntax
- The main difference: C++ support classes and objects, while C doesn’t
# simple C programm
# Include libraries
with the #include ...
syntax
- <> .. include standard system libraries
- <
stdio.h
>
- <
- "" .. include local library from path
- ”myLib.h”
# Header files
you can create own librariese or split functionality
Usage:
- global defines (not for global variables!)
- reusable software
myLib.h:
myLib.c:
# Global Variables
- allowed
- not nice!
- memory reserved at runtime
- do not use Header files for global vars
- define global vars only once!
Access from all files