SlideShare a Scribd company logo
1 of 13
REVISION SESSION
C LANGUAGE
Bachelor’s of Artificial Intelligence - DUET
C PROGRAM
Header Files
These are precompiled files that
have some functions defined in
them.
Entry Point
When a file is executed the entry
point in main function.
BASIC STRUCTURE OF
Delimiters
The braces after the function
definition signal the beginning and
end of the body of the function.
DATA TYPES
Integers
A whole number that is number not
having any fractional components
Float
An integer with floating point
Character
A single character.
Data Type
Keyword
Variable Name (Identifier)
Assignment
Arrays
Can contain a collection of similar
data type.
SIMPLE PROGRAM
• ‘&’ is used to target address of variable.
• ‘scanf’ is a function used for input.
• ‘printf’ is used for output.
• ‘%s’ is a format specifier.
CONDITIONAL STATEMENTS
• ‘==’ is a operator .
• ‘&&’, ‘||’, ‘!’ are logical operators.
• ‘!=’, ‘==’, ‘<’, ‘>’, ‘<=’, ‘>=’ are relational operators.
• The first statement will be executed if a is equal to 0.
• If a is equal to 1 then the second condition will be
executed.
• Otherwise, the last condition will be executed.
CONDITIONAL STATEMENTS
• The same conditions can be implemented using
a switch case.
• Switch-case conditions can’t have logical or
relational operators.
FOR LOOPS
WHILE LOOP
DO WHILE LOOP
• Do-While loops always get executed once
and then check the condition.
FUNCTIONS
• Prototyping
<<Return Type>> funName(params);
• Definition
<<returnType>> funName(params){}
• Function Call
funName(params);
• If the function does not return anything
then void is used.
POINTERS
• Pointer is a special variable that stores
address of another variable.
STRUCTURES
• Structures are user-defined data types.
• it is a collection of heterogenous
(different) data types.
THANK YOU

More Related Content

Similar to C Language Basics - Programming Fundamentals

An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
Adam Getchell
 
C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)
indrasir
 
Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)
mujeeb memon
 

Similar to C Language Basics - Programming Fundamentals (20)

Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 
Computer programming and utilization 2110003
Computer programming and utilization 2110003Computer programming and utilization 2110003
Computer programming and utilization 2110003
 
C language ppt
C language pptC language ppt
C language ppt
 
C intro
C introC intro
C intro
 
Pc module1
Pc module1Pc module1
Pc module1
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
 
Programming in C
Programming in CProgramming in C
Programming in C
 
An Overview Of Python With Functional Programming
An Overview Of Python With Functional ProgrammingAn Overview Of Python With Functional Programming
An Overview Of Python With Functional Programming
 
Python ppt
Python pptPython ppt
Python ppt
 
Chap 1 and 2
Chap 1 and 2Chap 1 and 2
Chap 1 and 2
 
C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)
 
Introduction to C
Introduction to CIntroduction to C
Introduction to C
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
C language updated
C language updatedC language updated
C language updated
 
Learning the C Language
Learning the C LanguageLearning the C Language
Learning the C Language
 
Learn Python The Hard Way Presentation
Learn Python The Hard Way PresentationLearn Python The Hard Way Presentation
Learn Python The Hard Way Presentation
 
C fundamentals
C fundamentalsC fundamentals
C fundamentals
 
C programming
C programmingC programming
C programming
 
Rr
RrRr
Rr
 
Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)Introduction to the c programming language (amazing and easy book for beginners)
Introduction to the c programming language (amazing and easy book for beginners)
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
mbmh111980
 

Recently uploaded (20)

A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Naer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research SynthesisNaer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research Synthesis
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdfMastering Windows 7 A Comprehensive Guide for Power Users .pdf
Mastering Windows 7 A Comprehensive Guide for Power Users .pdf
 
Malaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMalaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptx
 
Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
KLARNA -  Language Models and Knowledge Graphs: A Systems ApproachKLARNA -  Language Models and Knowledge Graphs: A Systems Approach
KLARNA - Language Models and Knowledge Graphs: A Systems Approach
 

C Language Basics - Programming Fundamentals

  • 1. REVISION SESSION C LANGUAGE Bachelor’s of Artificial Intelligence - DUET
  • 2. C PROGRAM Header Files These are precompiled files that have some functions defined in them. Entry Point When a file is executed the entry point in main function. BASIC STRUCTURE OF Delimiters The braces after the function definition signal the beginning and end of the body of the function.
  • 3. DATA TYPES Integers A whole number that is number not having any fractional components Float An integer with floating point Character A single character. Data Type Keyword Variable Name (Identifier) Assignment Arrays Can contain a collection of similar data type.
  • 4. SIMPLE PROGRAM • ‘&’ is used to target address of variable. • ‘scanf’ is a function used for input. • ‘printf’ is used for output. • ‘%s’ is a format specifier.
  • 5. CONDITIONAL STATEMENTS • ‘==’ is a operator . • ‘&&’, ‘||’, ‘!’ are logical operators. • ‘!=’, ‘==’, ‘<’, ‘>’, ‘<=’, ‘>=’ are relational operators. • The first statement will be executed if a is equal to 0. • If a is equal to 1 then the second condition will be executed. • Otherwise, the last condition will be executed.
  • 6. CONDITIONAL STATEMENTS • The same conditions can be implemented using a switch case. • Switch-case conditions can’t have logical or relational operators.
  • 9. DO WHILE LOOP • Do-While loops always get executed once and then check the condition.
  • 10. FUNCTIONS • Prototyping <<Return Type>> funName(params); • Definition <<returnType>> funName(params){} • Function Call funName(params); • If the function does not return anything then void is used.
  • 11. POINTERS • Pointer is a special variable that stores address of another variable.
  • 12. STRUCTURES • Structures are user-defined data types. • it is a collection of heterogenous (different) data types.