SlideShare une entreprise Scribd logo
1  sur  39
C Language Thursday, September 1, 2011 Avik Dhupar
Overview of C ,[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Program structure ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Header files ,[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Main function ,[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Writing the first program ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Running a C Program ,[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Comments in C ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Data types in C ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Variable names- Rules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Input and Output ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
For loops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
While loop ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Do While loop ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Conditional statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Conditional statement ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Operators ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
String functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Numeric functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Procedures ,[object Object],[object Object],[object Object],Thursday, September 1, 2011
Functions and Parameters ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Example function ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Actual and Formal parameters ,[object Object],[object Object],Thursday, September 1, 2011
Arrays ,[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Arrays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Structures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Structures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Type def ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Pointers ,[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Pointers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Examples ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Call by Value ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Call by reference ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Example program – Call by value ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Explanation Thursday, September 1, 2011
Example Program – Call by reference ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Thursday, September 1, 2011
Explanation a and x are referring to same location. So value will be over written. Thursday, September 1, 2011
Conclusion ,[object Object],[object Object],Thursday, September 1, 2011

Contenu connexe

Tendances

Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
Jeya Lakshmi
 

Tendances (20)

Pointer in c
Pointer in cPointer in c
Pointer in c
 
Variables in C Programming
Variables in C ProgrammingVariables in C Programming
Variables in C Programming
 
Storage class in C Language
Storage class in C LanguageStorage class in C Language
Storage class in C Language
 
Pointers in C Programming
Pointers in C ProgrammingPointers in C Programming
Pointers in C Programming
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Operators in C Programming
Operators in C ProgrammingOperators in C Programming
Operators in C Programming
 
String functions in C
String functions in CString functions in C
String functions in C
 
Array in c
Array in cArray in c
Array in c
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Conditional and control statement
Conditional and control statementConditional and control statement
Conditional and control statement
 
Data types in python
Data types in pythonData types in python
Data types in python
 
Functions in C
Functions in CFunctions in C
Functions in C
 
stack & queue
stack & queuestack & queue
stack & queue
 
Loops in C Programming Language
Loops in C Programming LanguageLoops in C Programming Language
Loops in C Programming Language
 
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
 
Array Of Pointers
Array Of PointersArray Of Pointers
Array Of Pointers
 
Pointers C programming
Pointers  C programmingPointers  C programming
Pointers C programming
 
Arrays in c
Arrays in cArrays in c
Arrays in c
 
Arrays
ArraysArrays
Arrays
 

Similaire à Basics of C programming

C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
Pranoti Doke
 
An Overview Of Standard C++Tr1
An Overview Of Standard C++Tr1An Overview Of Standard C++Tr1
An Overview Of Standard C++Tr1
Ganesh Samarthyam
 

Similaire à Basics of C programming (20)

C intro
C introC intro
C intro
 
Fundamentals of c language
Fundamentals of c languageFundamentals of c language
Fundamentals of c language
 
Learn C
Learn CLearn C
Learn C
 
F# 101
F# 101F# 101
F# 101
 
python and perl
python and perlpython and perl
python and perl
 
C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
 
An Overview Of Standard C++Tr1
An Overview Of Standard C++Tr1An Overview Of Standard C++Tr1
An Overview Of Standard C++Tr1
 
Bt0067 c programming and data structures2
Bt0067 c programming and data structures2Bt0067 c programming and data structures2
Bt0067 c programming and data structures2
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
 
C programming slide-6
C programming slide-6C programming slide-6
C programming slide-6
 
VIT351 Software Development VI Unit1
VIT351 Software Development VI Unit1VIT351 Software Development VI Unit1
VIT351 Software Development VI Unit1
 
Computer programming and utilization 2110003
Computer programming and utilization 2110003Computer programming and utilization 2110003
Computer programming and utilization 2110003
 
Savitch Ch 11
Savitch Ch 11Savitch Ch 11
Savitch Ch 11
 
Savitch ch 11
Savitch ch 11Savitch ch 11
Savitch ch 11
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
C tutorial
C tutorialC tutorial
C tutorial
 
C programming
C programmingC programming
C programming
 
Flutter Festival IIT Goa: Session 1
Flutter Festival IIT Goa: Session 1Flutter Festival IIT Goa: Session 1
Flutter Festival IIT Goa: Session 1
 
Qcon2011 functions rockpresentation_f_sharp
Qcon2011 functions rockpresentation_f_sharpQcon2011 functions rockpresentation_f_sharp
Qcon2011 functions rockpresentation_f_sharp
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 

Basics of C programming

Notes de l'éditeur

  1. We can also declare and define a variable in single shot like this. int a=10;
  2. Format specifiers %d is the format specifier. This informs to the compiler that the incoming value is an integer value. Other data types can be specified as follows: %c – character %f – float %lf – double %s – character array (string) Printf and scanf are defined under the header file stdio.h
  3. While – Entry controlled loop Do While – Exit controlled loop
  4. Header file to be included is string.h
  5. Header file to be included math.h
  6. For assigning more values we need to create an array of structure element like this Struct Person { Int id; Char name[5]; }P[10]; P[0].id = 1; P[0].name = “saran”; P[1].id = 2; P[1].name = “arya”; And so on till P[9]
  7. typedef struct student { int id; Char name[10]; }s; Now I can put s s1,s2; Instead of struct student s1,s2; //In case typedef is missed in struct definition as below struct student { int id; char name[10]; };