Basics of C Programming
History • Structure • Data Types •
Operators • Decisions
S.Prabhadevi,
Assistant Professor,
Department of Computer science,
Sri Sarada Niketan College of Science for
Women, Karur.
Slide 2: History of C
● Developed by Dennis Ritchie at Bell Labs (1972)
● Evolved from B and BCPL
● Designed to develop the UNIX operating system
● Influenced many modern languages: C++, Java, C#, Python
Slide 3: Importance of C
● Fast, efficient, and powerful
● Portable across systems
● Ideal for system programming and OS development
● Standard language for embedded systems
● Foundation for many higher-level languages
Slide 4: Structure of a C Program
● Preprocessor directives (e.g., #include <stdio.h>)
● main() function – starting point
● Variable declarations
● Statements and expressions
● Return statement (return 0;)
Example:
#include <stdio.h>
int main() {
printf("Hello World");
return 0;
}
Slide 5: Data Types in C
Primary Data Types
● int – integers
● float – decimal values
● char – characters
● double – large decimal values
● void – no return value
Derived Types
● Arrays
● Pointers
● Structures
● Functions
Slide 6: Constants & Variables
Variables
● Named memory locations
● Must be declared before use
Constants
● Fixed values that do not change
● Types: Integer, Float, Character, String constants
● Declared using const keyword
Thank You

Basics of C Programming History • Structure • Data Types • Operators • Decisions

  • 1.
    Basics of CProgramming History • Structure • Data Types • Operators • Decisions S.Prabhadevi, Assistant Professor, Department of Computer science, Sri Sarada Niketan College of Science for Women, Karur.
  • 2.
    Slide 2: Historyof C ● Developed by Dennis Ritchie at Bell Labs (1972) ● Evolved from B and BCPL ● Designed to develop the UNIX operating system ● Influenced many modern languages: C++, Java, C#, Python
  • 3.
    Slide 3: Importanceof C ● Fast, efficient, and powerful ● Portable across systems ● Ideal for system programming and OS development ● Standard language for embedded systems ● Foundation for many higher-level languages
  • 4.
    Slide 4: Structureof a C Program ● Preprocessor directives (e.g., #include <stdio.h>) ● main() function – starting point ● Variable declarations ● Statements and expressions ● Return statement (return 0;)
  • 5.
    Example: #include <stdio.h> int main(){ printf("Hello World"); return 0; }
  • 6.
    Slide 5: DataTypes in C Primary Data Types ● int – integers ● float – decimal values ● char – characters ● double – large decimal values ● void – no return value Derived Types ● Arrays ● Pointers ● Structures ● Functions
  • 7.
    Slide 6: Constants& Variables Variables ● Named memory locations ● Must be declared before use Constants ● Fixed values that do not change ● Types: Integer, Float, Character, String constants ● Declared using const keyword
  • 8.