Structure of a C program/project, 2020, with example

in #c4 years ago

Structure of a C program/project

Hello and welcome to my channel, I am “Code Shepherd”and in this video we will talk about how the code is organized for a project written in “C” programming language.

At the end of this video you will understand the structure of a project written in C, how is the code organized, and you will be able to do much better when you will have to manage your own project,
or when you will have to explain these topics inside the team you are part of, or maybe when you go to a job interview.

I have prepared a demo project and I will this to explain how a project written in C is structured( source files and header files).

We will discuss about how a project is structured in modules(a pair of files(source file(.c) and header file(.h) is informally known as a module).

Also we will discuss about functions, prototypes and public interfaces which are defined in header files, and how the implementation of these functions and variables are defined in *.c files.

The preprocessor directives(#include,#define,#ifdef etc.) have a very important role in a C program and we will talk about them.

Next we will discuss about public definitions of types, constants, global variables and prototypes of functions that can be used outside the module.

We will also discuss abou how to prevent multiple inclusions of header files by using #ifndef SYMBOL and #endif.

And we will talk about private functions(static functions) and variables(static variables) in a module.

Thank you and see you next time!

Other videos:
Top 3 programming languages in 2020, from a personal perspective :


Top 9 "C Programming Interview Questions And Answers" :

Please comment below what do you think about this video, and what videos do you I should make next :)

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.028
BTC 57740.57
ETH 3127.01
USDT 1.00
SBD 2.33