SlideShare a Scribd company logo
1 of 23
Learn To Code: Introduction to C
Sharvaani Thoguluva
Technical
and
Non-Technical Team
Member
Achutha Dharani
Non-Technical Team
Member
The 3 W's of Coding
● What is Coding?
● Why should you learn to code?
● Where is coding used?
● Coding is how we communicate with computers.
● Code tells a computer what actions to take, and writing code is
like creating a set of instructions.
● By learning to write code, you can tell computers what to do.
● You can use this skill to make websites and apps, and do
lots of other cool things.
What is Coding?
● Programming helps to learn problem-solving skills
● Computer programming gives a challenge and helps
them develop resilience
● Coding teaches us how to think
● One can expand their creativity when they learn how
to code
● Computer programming is the future
Why should you learn to code?
● Video Games
● Websites
● Smartphones
and a lot more...
Where do we use Coding?
● C is a general-purpose programming language that is extremely popular,
simple, and flexible to use.
● It is a structured programming language that is machine-independent
and extensively used to write various applications.
● It is said that ‘C’ is the god of programming language.
● One can say, C is a base for the programming.
What is C Programming Language?
● When we say Output, it means to display some data on screen, printer, or
in any file.
● C programming provides a set of built-in functions to output the data on
the computer screen as well as to save it in text or binary files.
Syntax:
● Normal expression: printf(“Expression to be typed”);
● Printing variable: printf(“%d”, sum);
● Printing expression with variable: printf(“The sum is %d”,sum);
Output in C
Datatypes
● Each variable in C has an associated data type. Each data type requires
different amounts of memory and has some specific operations which can be
performed over it.
● The C language provides the four basic arithmetic type specifiers char, int,
float and double, and the modifiers signed, unsigned, short, and long.
What are Datatypes?
● A variable is a name of the memory location.
● It is used to store data.
● Its value can be changed
● It is a way to represent memory location through symbol so that it can be
easily identified.
Let's see the syntax to declare a variable:
type variablename;
Variables
A little into variables!
● Local variable
● Global variable
● Static variable
● Automatic variable
● External variable
Types of Variables in C
There are many types of variables in c:
Rules For Defining Variables
Few rules to define a variable!
● A variable can have alphabets, digits, and underscore.
● A variable name can start with the alphabet, and underscore only. It can’t
start with a digit.
● No whitespace is allowed within the variable name.
● A variable name must not be any reserved word or keyword, e.g. int, goto ,
etc.
Input in C
• When we say Input, it means to feed some data into a program. An
input can be given in the form of a file or from the command line.
• C programming provides a set of built-in functions to read the given
input and feed it to the program as per requirement.
Syntax: scanf("%d", &intVariable);
Operators
● An operator is a symbol that operates on a value or a variable.
● For example: + is an operator to perform addition.
● C has a wide range of operators to perform various operations.
Control Structures
● Selection (Conditional) : Execution of a set of statements
when a particular condition is met
● Iteration (Loops): Repetition of the execution of a set of
statements as long as the condition is satisfied
if and else if
Selection
if if-else
Syntax
if (condition)
{
Statement;
………...
}
if (condition)
{
Statement;
}
else
{
Statement;
}
if else-if ladder and nested if
Selection
if else-if ladder nested if
Syntax
if (condition1)
{
Statements;
}
else if (condition2)
{
Statement;
}
else if (condition3)
{
Statement;
}
…..
else
{
Statement;
}
if (condition 1)
{
if (condition 2)
{
Statement;
}
………………...
}
Switch Case
Selection
Syntax
switch (expression)
{
case constant expression:
statements;
break;
case constant expression:
statements;
break;
default:
statements;
}
for loop
Iterations
Syntax
for (initialization; condition; increment)
{
statements;
}
while loop
Iterations
Syntax
while (condition)
{
statements;
}
Control Structures
Difference between for and while loops
For While
● Used only when the number of iterations
are known beforehand
● If the condition is not put, the loop will
repeat/iterate infinite number of times
● Initialization is not repeated
● Usually used when the number of
iterations are not known beforehand
● If the condition is not given, then it will
result into an error
Programming a formula
Write a program in C to find the sum of ‘N’ numbers.

More Related Content

What's hot

Looping and switch cases
Looping and switch casesLooping and switch cases
Looping and switch casesMeoRamos
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced JavascriptDhruvin Shah
 
Sharable of qualities of clean code
Sharable of qualities of clean codeSharable of qualities of clean code
Sharable of qualities of clean codeEman Mohamed
 
Introduction to Erlang Programming Language
Introduction to Erlang Programming LanguageIntroduction to Erlang Programming Language
Introduction to Erlang Programming LanguageYasas Gunarathne
 
8 introduction to_java_script
8 introduction to_java_script8 introduction to_java_script
8 introduction to_java_scriptVijay Kalyan
 
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16Innovecs
 
Code analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMDCode analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMDKan-Han (John) Lu
 
Scala the good and bad parts
Scala the good and bad partsScala the good and bad parts
Scala the good and bad partsbenewu
 
Grooming with Groovy
Grooming with GroovyGrooming with Groovy
Grooming with GroovyDhaval Dalal
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with XtendSven Efftinge
 

What's hot (20)

Switch case and looping
Switch case and loopingSwitch case and looping
Switch case and looping
 
Looping and switch cases
Looping and switch casesLooping and switch cases
Looping and switch cases
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced Javascript
 
Typescript Basics
Typescript BasicsTypescript Basics
Typescript Basics
 
Java script
Java scriptJava script
Java script
 
Basic constructs i
Basic constructs  iBasic constructs  i
Basic constructs i
 
Sharable of qualities of clean code
Sharable of qualities of clean codeSharable of qualities of clean code
Sharable of qualities of clean code
 
Inheritance
InheritanceInheritance
Inheritance
 
Introduction to JavaScript Programming
Introduction to JavaScript ProgrammingIntroduction to JavaScript Programming
Introduction to JavaScript Programming
 
Introduction to Erlang Programming Language
Introduction to Erlang Programming LanguageIntroduction to Erlang Programming Language
Introduction to Erlang Programming Language
 
8 introduction to_java_script
8 introduction to_java_script8 introduction to_java_script
8 introduction to_java_script
 
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
Introduction Functional Programming - Tech Hangout #11 - 2013.01.16
 
Introductory func prog
Introductory func progIntroductory func prog
Introductory func prog
 
Code analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMDCode analyzer: FindBugs and PMD
Code analyzer: FindBugs and PMD
 
Scala the good and bad parts
Scala the good and bad partsScala the good and bad parts
Scala the good and bad parts
 
overview of c#
overview of c#overview of c#
overview of c#
 
Grooming with Groovy
Grooming with GroovyGrooming with Groovy
Grooming with Groovy
 
Typescript
TypescriptTypescript
Typescript
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Functional programming with Xtend
Functional programming with XtendFunctional programming with Xtend
Functional programming with Xtend
 

Similar to Learn To Code: Introduction to c

Semester-1-22-23-Introduction_to_c_programming.ppt
Semester-1-22-23-Introduction_to_c_programming.pptSemester-1-22-23-Introduction_to_c_programming.ppt
Semester-1-22-23-Introduction_to_c_programming.pptChetanChauhan203001
 
Introduction_to_c_programming.ppt for software developing students
Introduction_to_c_programming.ppt for software developing studentsIntroduction_to_c_programming.ppt for software developing students
Introduction_to_c_programming.ppt for software developing studentsAsfiya14
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction toolssunilchute1
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdfRajb54
 
C programmimng basic.ppt
C programmimng basic.pptC programmimng basic.ppt
C programmimng basic.pptASIT Education
 
Data structure & Algorithms - Programming in C
Data structure & Algorithms - Programming in CData structure & Algorithms - Programming in C
Data structure & Algorithms - Programming in Cbabuk110
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingAlpana Gupta
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptxRowank2
 
C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)indrasir
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYRajeshkumar Reddy
 

Similar to Learn To Code: Introduction to c (20)

C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
Basic c
Basic cBasic c
Basic c
 
Semester-1-22-23-Introduction_to_c_programming.ppt
Semester-1-22-23-Introduction_to_c_programming.pptSemester-1-22-23-Introduction_to_c_programming.ppt
Semester-1-22-23-Introduction_to_c_programming.ppt
 
Introduction_to_c_programming.ppt for software developing students
Introduction_to_c_programming.ppt for software developing studentsIntroduction_to_c_programming.ppt for software developing students
Introduction_to_c_programming.ppt for software developing students
 
C.ppt
C.pptC.ppt
C.ppt
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
 
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
Basic of C Programming | 2022 Updated | By Shamsul H. AnsariBasic of C Programming | 2022 Updated | By Shamsul H. Ansari
Basic of C Programming | 2022 Updated | By Shamsul H. Ansari
 
C programming
C programmingC programming
C programming
 
67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf67404923-C-Programming-Tutorials-Doc.pdf
67404923-C-Programming-Tutorials-Doc.pdf
 
C programmimng basic.ppt
C programmimng basic.pptC programmimng basic.ppt
C programmimng basic.ppt
 
C programming
C programmingC programming
C programming
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
C Programming - Refresher - Part I
C Programming - Refresher - Part I C Programming - Refresher - Part I
C Programming - Refresher - Part I
 
Data structure & Algorithms - Programming in C
Data structure & Algorithms - Programming in CData structure & Algorithms - Programming in C
Data structure & Algorithms - Programming in C
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptx
 
C programming
C programmingC programming
C programming
 
C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)C basics 4 std11(GujBoard)
C basics 4 std11(GujBoard)
 
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDYC LANGUAGE UNIT-1 PREPARED BY MVB REDDY
C LANGUAGE UNIT-1 PREPARED BY MVB REDDY
 

More from SadhanaParameswaran

Introduction to Web Development - JavaScript
Introduction to Web Development - JavaScriptIntroduction to Web Development - JavaScript
Introduction to Web Development - JavaScriptSadhanaParameswaran
 
Introduction to Web Development - CSS
Introduction to Web Development - CSSIntroduction to Web Development - CSS
Introduction to Web Development - CSSSadhanaParameswaran
 
Introduction to Web Development - HTML
Introduction to Web Development - HTMLIntroduction to Web Development - HTML
Introduction to Web Development - HTMLSadhanaParameswaran
 
Introduction to data science.pptx
Introduction to data science.pptxIntroduction to data science.pptx
Introduction to data science.pptxSadhanaParameswaran
 
Flutter Festivals GDSC ASEB | Introduction to Flutter
Flutter Festivals GDSC ASEB | Introduction to FlutterFlutter Festivals GDSC ASEB | Introduction to Flutter
Flutter Festivals GDSC ASEB | Introduction to FlutterSadhanaParameswaran
 
Flutter Festivals GDSC ASEB | Introduction to Dart
Flutter Festivals GDSC ASEB | Introduction to DartFlutter Festivals GDSC ASEB | Introduction to Dart
Flutter Festivals GDSC ASEB | Introduction to DartSadhanaParameswaran
 
Explore ML with Crowdsource | Neural Networks - Session 3
Explore ML with Crowdsource | Neural Networks - Session 3Explore ML with Crowdsource | Neural Networks - Session 3
Explore ML with Crowdsource | Neural Networks - Session 3SadhanaParameswaran
 
Explore ML with Crowdsource | ML Extended - Session 4
Explore ML with Crowdsource | ML Extended - Session 4Explore ML with Crowdsource | ML Extended - Session 4
Explore ML with Crowdsource | ML Extended - Session 4SadhanaParameswaran
 
Explore ML with Crowdsource | Intro to ML - Session 2
Explore ML with Crowdsource | Intro to ML - Session 2Explore ML with Crowdsource | Intro to ML - Session 2
Explore ML with Crowdsource | Intro to ML - Session 2SadhanaParameswaran
 
Learn To Code: Next steps for python
Learn To Code: Next steps for pythonLearn To Code: Next steps for python
Learn To Code: Next steps for pythonSadhanaParameswaran
 

More from SadhanaParameswaran (18)

Introduction to Web Development - JavaScript
Introduction to Web Development - JavaScriptIntroduction to Web Development - JavaScript
Introduction to Web Development - JavaScript
 
Introduction to Web Development - CSS
Introduction to Web Development - CSSIntroduction to Web Development - CSS
Introduction to Web Development - CSS
 
Introduction to Web Development - HTML
Introduction to Web Development - HTMLIntroduction to Web Development - HTML
Introduction to Web Development - HTML
 
Introduction to data science.pptx
Introduction to data science.pptxIntroduction to data science.pptx
Introduction to data science.pptx
 
Flutter Festivals GDSC ASEB | Introduction to Flutter
Flutter Festivals GDSC ASEB | Introduction to FlutterFlutter Festivals GDSC ASEB | Introduction to Flutter
Flutter Festivals GDSC ASEB | Introduction to Flutter
 
Flutter Festivals GDSC ASEB | Introduction to Dart
Flutter Festivals GDSC ASEB | Introduction to DartFlutter Festivals GDSC ASEB | Introduction to Dart
Flutter Festivals GDSC ASEB | Introduction to Dart
 
Explore ML with Crowdsource | Neural Networks - Session 3
Explore ML with Crowdsource | Neural Networks - Session 3Explore ML with Crowdsource | Neural Networks - Session 3
Explore ML with Crowdsource | Neural Networks - Session 3
 
Explore ML with Crowdsource | ML Extended - Session 4
Explore ML with Crowdsource | ML Extended - Session 4Explore ML with Crowdsource | ML Extended - Session 4
Explore ML with Crowdsource | ML Extended - Session 4
 
Android Study Jams Session 5
Android Study Jams Session 5Android Study Jams Session 5
Android Study Jams Session 5
 
Explore ML with Crowdsource | Intro to ML - Session 2
Explore ML with Crowdsource | Intro to ML - Session 2Explore ML with Crowdsource | Intro to ML - Session 2
Explore ML with Crowdsource | Intro to ML - Session 2
 
Android Study Jams Session 4
Android Study Jams Session 4Android Study Jams Session 4
Android Study Jams Session 4
 
Android Study Jams - Session 3
Android Study Jams - Session 3Android Study Jams - Session 3
Android Study Jams - Session 3
 
Android Study Jams - Session 2
Android Study Jams - Session 2Android Study Jams - Session 2
Android Study Jams - Session 2
 
Android Study Jams - Session 1
Android Study Jams - Session 1Android Study Jams - Session 1
Android Study Jams - Session 1
 
Learn To Code: Next steps for python
Learn To Code: Next steps for pythonLearn To Code: Next steps for python
Learn To Code: Next steps for python
 
Hacktoberfest 2021
Hacktoberfest 2021Hacktoberfest 2021
Hacktoberfest 2021
 
Dominion over domains
Dominion over domainsDominion over domains
Dominion over domains
 
30 days of google cloud 2021
30 days of google cloud 202130 days of google cloud 2021
30 days of google cloud 2021
 

Recently uploaded

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 

Recently uploaded (20)

Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 

Learn To Code: Introduction to c

  • 1. Learn To Code: Introduction to C Sharvaani Thoguluva Technical and Non-Technical Team Member Achutha Dharani Non-Technical Team Member
  • 2. The 3 W's of Coding ● What is Coding? ● Why should you learn to code? ● Where is coding used?
  • 3. ● Coding is how we communicate with computers. ● Code tells a computer what actions to take, and writing code is like creating a set of instructions. ● By learning to write code, you can tell computers what to do. ● You can use this skill to make websites and apps, and do lots of other cool things. What is Coding?
  • 4. ● Programming helps to learn problem-solving skills ● Computer programming gives a challenge and helps them develop resilience ● Coding teaches us how to think ● One can expand their creativity when they learn how to code ● Computer programming is the future Why should you learn to code?
  • 5. ● Video Games ● Websites ● Smartphones and a lot more... Where do we use Coding?
  • 6. ● C is a general-purpose programming language that is extremely popular, simple, and flexible to use. ● It is a structured programming language that is machine-independent and extensively used to write various applications. ● It is said that ‘C’ is the god of programming language. ● One can say, C is a base for the programming. What is C Programming Language?
  • 7. ● When we say Output, it means to display some data on screen, printer, or in any file. ● C programming provides a set of built-in functions to output the data on the computer screen as well as to save it in text or binary files. Syntax: ● Normal expression: printf(“Expression to be typed”); ● Printing variable: printf(“%d”, sum); ● Printing expression with variable: printf(“The sum is %d”,sum); Output in C
  • 8. Datatypes ● Each variable in C has an associated data type. Each data type requires different amounts of memory and has some specific operations which can be performed over it. ● The C language provides the four basic arithmetic type specifiers char, int, float and double, and the modifiers signed, unsigned, short, and long. What are Datatypes?
  • 9.
  • 10. ● A variable is a name of the memory location. ● It is used to store data. ● Its value can be changed ● It is a way to represent memory location through symbol so that it can be easily identified. Let's see the syntax to declare a variable: type variablename; Variables A little into variables!
  • 11. ● Local variable ● Global variable ● Static variable ● Automatic variable ● External variable Types of Variables in C There are many types of variables in c:
  • 12. Rules For Defining Variables Few rules to define a variable! ● A variable can have alphabets, digits, and underscore. ● A variable name can start with the alphabet, and underscore only. It can’t start with a digit. ● No whitespace is allowed within the variable name. ● A variable name must not be any reserved word or keyword, e.g. int, goto , etc.
  • 13. Input in C • When we say Input, it means to feed some data into a program. An input can be given in the form of a file or from the command line. • C programming provides a set of built-in functions to read the given input and feed it to the program as per requirement. Syntax: scanf("%d", &intVariable);
  • 14. Operators ● An operator is a symbol that operates on a value or a variable. ● For example: + is an operator to perform addition. ● C has a wide range of operators to perform various operations.
  • 15.
  • 16. Control Structures ● Selection (Conditional) : Execution of a set of statements when a particular condition is met ● Iteration (Loops): Repetition of the execution of a set of statements as long as the condition is satisfied
  • 17. if and else if Selection if if-else Syntax if (condition) { Statement; ………... } if (condition) { Statement; } else { Statement; }
  • 18. if else-if ladder and nested if Selection if else-if ladder nested if Syntax if (condition1) { Statements; } else if (condition2) { Statement; } else if (condition3) { Statement; } ….. else { Statement; } if (condition 1) { if (condition 2) { Statement; } ………………... }
  • 19. Switch Case Selection Syntax switch (expression) { case constant expression: statements; break; case constant expression: statements; break; default: statements; }
  • 20. for loop Iterations Syntax for (initialization; condition; increment) { statements; }
  • 22. Control Structures Difference between for and while loops For While ● Used only when the number of iterations are known beforehand ● If the condition is not put, the loop will repeat/iterate infinite number of times ● Initialization is not repeated ● Usually used when the number of iterations are not known beforehand ● If the condition is not given, then it will result into an error
  • 23. Programming a formula Write a program in C to find the sum of ‘N’ numbers.