SlideShare a Scribd company logo
1 of 34
1
What is programming?
Input:
A command which is
given by the
programmer
e.g.
We are EEE family
(We want to print out
what we’ve written)
Processing Unit:
 Analysing the command
 Converting input command in
binary data
 Process the binary command
 Converting to aspect result
e.g.
i. We are EEE family = 0101…..
ii. Process 0101……
iii. 0101= We are EEE family
Output:
Result of the process
e.g.
We are EEE family
(Computer’ve printed
out what we had
wanted to write)
2
What is compiler?
Compilers we specially require:
• Code-blocks (for c or c++ programming)
• Net-Beans (for Java or Android programming)
3
4
C Symbolic patterns
General knowledge of C coding:
CODING:
5
#include <stdio.h>
//include standard input & output numbers
#include <stdlib.h>
//include standard library numbers
int main()
// main function , integer type ,not including any arguments
{
printf(" ");
// means new line
return 0;
//main function doesn’t return any value
}
6
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf(" ");
return 0;
}
Data types:
7
Bytes Required:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a;
float b;
char c;
int s1,s2,s3;
s1=sizeof(a);
s2=sizeof(b);
s3=sizeof(c);
printf ("%d %d %d ",s1,s2,s3);
return 0;
}
 An integer requires 4 bytes
of Memory
 A float requires 4 bytes of
Memory
 A character requires 1 byte
of Memory
 A string requires (x + Null)
bytes . Here x is its total
bytes of characters
Some important Functions & Features:
8
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
for (i=0;i<10;i++)
{
printf("%dn",i);
}
for (i=9;i>=0;i--)
{
printf("%dn",i);
}
return 0;
}
9
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i=0;
while(i<10)
{
printf("%dn",i);
i++;
}
int y=1;
while(y==1)
{
printf("while function is working n");
printf("Press 1 to continue else any key to close:");
scanf("%d",&y);
}
return 0;
}
10
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i=0;
do
{
printf("%dn",i);
i++;
}
while(i<10);
return 0;
}
11
Array
12
User define function:
13
User define function:
14
Pointer variable:
15
C programs 16
17
18
19
20
21
22
23
24
25
int factorial (int a)
{
int i,b=1;
for (i=1;i<=a;i++)
{
b=b*i;
}
return(b);
}
26
27
28
29
30
31
32
33
34

More Related Content

Viewers also liked

Data structures / C++ Program examples
Data structures / C++ Program examplesData structures / C++ Program examples
Data structures / C++ Program examplesKevin III
 
Learning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageLearning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageAbhishek Dwivedi
 
Presentation Active Listening
Presentation Active ListeningPresentation Active Listening
Presentation Active Listeningirina_dragnea
 
Active Listening Presentation
Active Listening PresentationActive Listening Presentation
Active Listening Presentationkdbourque
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programmingavikdhupar
 

Viewers also liked (7)

Data structures / C++ Program examples
Data structures / C++ Program examplesData structures / C++ Program examples
Data structures / C++ Program examples
 
Learning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C LanguageLearning c - An extensive guide to learn the C Language
Learning c - An extensive guide to learn the C Language
 
Presentation Active Listening
Presentation Active ListeningPresentation Active Listening
Presentation Active Listening
 
Active Listening Presentation
Active Listening PresentationActive Listening Presentation
Active Listening Presentation
 
Interpersonal skills
Interpersonal skillsInterpersonal skills
Interpersonal skills
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
Active Listening for Well Being
Active Listening for Well BeingActive Listening for Well Being
Active Listening for Well Being
 

Similar to Learning c programming by rbm

Similar to Learning c programming by rbm (20)

l1-introduction_to_computers_and_c_programming.pptx
l1-introduction_to_computers_and_c_programming.pptxl1-introduction_to_computers_and_c_programming.pptx
l1-introduction_to_computers_and_c_programming.pptx
 
C Theory
C TheoryC Theory
C Theory
 
Unit 5
Unit 5Unit 5
Unit 5
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 
C Programming
C ProgrammingC Programming
C Programming
 
Cpp
CppCpp
Cpp
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Basics Of C++.pptx
Basics Of C++.pptxBasics Of C++.pptx
Basics Of C++.pptx
 
C - ISRO
C - ISROC - ISRO
C - ISRO
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
 
Lect '1'
Lect '1'Lect '1'
Lect '1'
 
General structure of c++
General structure of c++General structure of c++
General structure of c++
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
C++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWAREC++ AND CATEGORIES OF SOFTWARE
C++ AND CATEGORIES OF SOFTWARE
 
Learn python
Learn pythonLearn python
Learn python
 
C++ programming language basic to advance level
C++ programming language basic to advance levelC++ programming language basic to advance level
C++ programming language basic to advance level
 
Lecture-01-2020J.pptx
Lecture-01-2020J.pptxLecture-01-2020J.pptx
Lecture-01-2020J.pptx
 
C structure
C structureC structure
C structure
 
C
CC
C
 

Recently uploaded

Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsMathias Magdowski
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Studentskannan348865
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.benjamincojr
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...Amil baba
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfSkNahidulIslamShrabo
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..MaherOthman7
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdfKamal Acharya
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxMustafa Ahmed
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxMustafa Ahmed
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...archanaece3
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxMANASINANDKISHORDEOR
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Stationsiddharthteach18
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docxrahulmanepalli02
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualBalamuruganV28
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligencemahaffeycheryld
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailingAshishSingh1301
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024EMMANUELLEFRANCEHELI
 

Recently uploaded (20)

Filters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility ApplicationsFilters for Electromagnetic Compatibility Applications
Filters for Electromagnetic Compatibility Applications
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Working Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdfWorking Principle of Echo Sounder and Doppler Effect.pdf
Working Principle of Echo Sounder and Doppler Effect.pdf
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 
Insurance management system project report.pdf
Insurance management system project report.pdfInsurance management system project report.pdf
Insurance management system project report.pdf
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Dynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptxDynamo Scripts for Task IDs and Space Naming.pptx
Dynamo Scripts for Task IDs and Space Naming.pptx
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx21P35A0312 Internship eccccccReport.docx
21P35A0312 Internship eccccccReport.docx
 
Final DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manualFinal DBMS Manual (2).pdf final lab manual
Final DBMS Manual (2).pdf final lab manual
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 

Learning c programming by rbm

  • 1. 1
  • 2. What is programming? Input: A command which is given by the programmer e.g. We are EEE family (We want to print out what we’ve written) Processing Unit:  Analysing the command  Converting input command in binary data  Process the binary command  Converting to aspect result e.g. i. We are EEE family = 0101….. ii. Process 0101…… iii. 0101= We are EEE family Output: Result of the process e.g. We are EEE family (Computer’ve printed out what we had wanted to write) 2
  • 3. What is compiler? Compilers we specially require: • Code-blocks (for c or c++ programming) • Net-Beans (for Java or Android programming) 3
  • 5. General knowledge of C coding: CODING: 5 #include <stdio.h> //include standard input & output numbers #include <stdlib.h> //include standard library numbers int main() // main function , integer type ,not including any arguments { printf(" "); // means new line return 0; //main function doesn’t return any value }
  • 6. 6 #include <stdio.h> #include <stdlib.h> int main() { printf(" "); return 0; }
  • 7. Data types: 7 Bytes Required: #include <stdio.h> #include <stdlib.h> int main() { int a; float b; char c; int s1,s2,s3; s1=sizeof(a); s2=sizeof(b); s3=sizeof(c); printf ("%d %d %d ",s1,s2,s3); return 0; }  An integer requires 4 bytes of Memory  A float requires 4 bytes of Memory  A character requires 1 byte of Memory  A string requires (x + Null) bytes . Here x is its total bytes of characters
  • 8. Some important Functions & Features: 8 #include <stdio.h> #include <stdlib.h> int main() { int i; for (i=0;i<10;i++) { printf("%dn",i); } for (i=9;i>=0;i--) { printf("%dn",i); } return 0; }
  • 9. 9 #include <stdio.h> #include <stdlib.h> int main() { int i=0; while(i<10) { printf("%dn",i); i++; } int y=1; while(y==1) { printf("while function is working n"); printf("Press 1 to continue else any key to close:"); scanf("%d",&y); } return 0; }
  • 10. 10 #include <stdio.h> #include <stdlib.h> int main() { int i=0; do { printf("%dn",i); i++; } while(i<10); return 0; }
  • 11. 11
  • 17. 17
  • 18. 18
  • 19. 19
  • 20. 20
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 25. 25 int factorial (int a) { int i,b=1; for (i=1;i<=a;i++) { b=b*i; } return(b); }
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. 29
  • 30. 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34