1 of 5

INTRODUCTION TO C (PROGRAMMING LANGUAGE)

Presented By:-

Minakshi Sharma

Govt. College Barwala Hisar

2 of 5

it’s a powerful general-purpose language used for :-� system-level programming, � embedded systems, � and software development.

  • �
  • it’s a powerful general-purpose language used for system-level programming, embedded systems, and software development.

​

Developed in 1972 by Dennis Ritchie at Bell Labs.

3 of 5

FEATURES OF C

  • Simplicity: Easy to learn and write with a small number of keywords.
  • Efficiency: Ideal for low-level programming, offering high performance.
  • Portability: Code written in C can be run on different platforms with minimal changes.
  • Flexibility: Used for various applications like system programming, game development, and embedded systems.
  • Modularity: Allows breaking programs into smaller modules using functions.

4 of 5

Basic Structure of a C Program

A simple C program consists of:

​

  1. Preprocessor Directives: Instructions for the compiler, starting with # (e.g., #include).

​

  • Main Function: The entry point of a C program.

​

5 of 5

Simple C Program to display Hello World

#include <stdio.h> // Preprocessor directive for input/output functions

int main()

{

printf("Hello, World!\n"); // Prints output to the screen

}

Note:- This statement is a single line comment that starts from // symbol :- // Prints output to the screen