INTRODUCTION TO
C PROGRAMMING
BASICS OF THE C LANGUAGE
WHAT IS C LANGUAGE?
• Developed by Dennis Ritchie in 1972
• A procedural and structured programming language
• Used for system software, embedded systems, and game development
• Known for its speed and efficiency
FEATURES OF C
• Simple & easy to learn
• Portable across platforms
• Rich library of functions
• Low-level memory access
• Fast execution
STRUCTURE OF A C PROGRAM
• #include – Preprocessor directive
• main() – Entry point
• printf() – Function to display output
• return 0; – Program ends successfully
DATATYPES &VARIABLES
• Data Types: int, float, char, double
• Variables: Named storage (e.g., int age = 20;)
• Constants: Fixed values (const float pi = 3.14;)
OPERATORS & CONTROL STATEMENTS
• Operators:
• + - * / %, == !=, && ||, = +=
• Control Statements:
• Decision: if, if-else, switch
• Loops: for, while, do-while
• Jump: break, continue
FUNCTIONS,ARRAYS & POINTERS
• Functions: Block of reusable code
• int add(int a, int b) { return a + b; }
• Arrays: Group of elements: int a[5];
• Pointers: Stores address of a variable: int *ptr;
APPLICATIONS & CONCLUSION
• Used in:
• Operating Systems (Linux)
• Compilers
• Embedded Systems
• Game Engines
• Conclusion:
• C is a powerful and foundational language every programmer should learn.
THANK YOU
Presented by:Ansari Sabaparvin
Division : G
Enrollment number : 2404030100995
Subject: DIPC

introduction to c programming(basic of the c laanguage).pptx

  • 1.
  • 2.
    WHAT IS CLANGUAGE? • Developed by Dennis Ritchie in 1972 • A procedural and structured programming language • Used for system software, embedded systems, and game development • Known for its speed and efficiency
  • 3.
    FEATURES OF C •Simple & easy to learn • Portable across platforms • Rich library of functions • Low-level memory access • Fast execution
  • 4.
    STRUCTURE OF AC PROGRAM • #include – Preprocessor directive • main() – Entry point • printf() – Function to display output • return 0; – Program ends successfully
  • 5.
    DATATYPES &VARIABLES • DataTypes: int, float, char, double • Variables: Named storage (e.g., int age = 20;) • Constants: Fixed values (const float pi = 3.14;)
  • 6.
    OPERATORS & CONTROLSTATEMENTS • Operators: • + - * / %, == !=, && ||, = += • Control Statements: • Decision: if, if-else, switch • Loops: for, while, do-while • Jump: break, continue
  • 7.
    FUNCTIONS,ARRAYS & POINTERS •Functions: Block of reusable code • int add(int a, int b) { return a + b; } • Arrays: Group of elements: int a[5]; • Pointers: Stores address of a variable: int *ptr;
  • 8.
    APPLICATIONS & CONCLUSION •Used in: • Operating Systems (Linux) • Compilers • Embedded Systems • Game Engines • Conclusion: • C is a powerful and foundational language every programmer should learn.
  • 9.
    THANK YOU Presented by:AnsariSabaparvin Division : G Enrollment number : 2404030100995 Subject: DIPC