C Programming

Introduction

This course is about discussing the different concepts of C – Programming Language. The course address different basic , intermediate and advance concept of C Programming Language. Stay tuned and Learning C- Programming language steps by step applying the concept. The learning approach support example at each phase of the topic.

C-Language In Brief

C is a general-purpose programming language created by Dennis Ritchie at the AT&T (then called Bell Laboratory) in 1972. It was designed to overcome the problems encountered by BASIC, B, and BPCL programming languages. It is a very popular language created by combination of both low level (assembly) and high-level programming languages. C language is a procedural language that supports structured programming and provides low-level access/coding-embedded programming, system access, and high-speed performance in various industries like semiconductor, hardware, and storage industries..

Important feature that C is mainly working and play significant role are the follow

  • BuiltIn functions and operators that can solve virtually any complex problem.
  •  It is used to write an application and interact with low-level system memory and hardware.
  • It can be written on practically any operating system and even works in most handheld devices
  • Programs written in C are speedy due to the support provided by its datatypes and operators
  • It is easily extendable, as C++ was derived from C with additions like OOPS and other features.
  • Functions and operators are supported by the libraries 

Despite being old, C Language plays a great role in the field of computer science and imperative, procedural, and general-purpose language. It is cornerstone of software development, opens doors to roles like software development, embedded systems engineering, game development, and cybersecurity and server as a foundation  for innovation, powering critical systems, firmware, and research.

Figure 1.1: – C – Programming Language

Writing C Language

Writing a C language is really fun once you know what structure that a C program has. The C program is composed of different important elements In this topic we will address these elements one by one

  • Preprocessor Directives
  • main() function
  • Compiler
  • DataTypes
  • Variable
  • Constants
  • Operators
  • Controle Statements
  • Console keywords
  • And Other elements

PreProcessor Directives

It is the first line that is executed in C programming language. It is represented using a #include and putting the library name within angle bracket. like <library.h> having the library file ending with .h.  This will associate the program with the library. The compiler transform the program before compilation use the preprocessor. The libraries indicated in the preprocessor are built in C programming language compiler and contains different set of functions to support different functionality in our development. Some of the known preprocessors are the following

#include <stdio.h> // support a function  that is used to print our to console
#include <conio.h> // support a function that input/output on the console, or to receive input from the user's keyboard and show results on the screen
e.t.c

main() function

This is an important function in the C program within which the content of the program or logic or calculation will be written. It can also support a return type. The structure of the main function can have one or more of the following

#include<stdio.h>  
#include<conio.h>  
// Main function with return value
int main()  
{  
    printf("Welcome to C Programming Lang"); 
    return 0;
} 
#include<stdio.h>  
#include<conio.h> 
//Main function without return value
void main()  
{  
    printf("Welcome to C Programming Lang");
}

Compiler

It is a program installed in a development tool that is used to execute our C program by compiling all the logic and libraries together and turn to executable program. The compiler can be GUI or Non-GUI, and installed as part of IDE like Turbo, Xcode or operating system like Linux or Unix, that help us to write and run C program. The compiler perform the following phases behind the scenes to make the program executable

Figure 1.2: – Compiler C Language

Scroll to Top