SlideShare a Scribd company logo
Writing C program in Ubuntu
Computational Skills Practical
B.E. First Semester Engineering
At this point you should save your file as
Eg: filename.c
But we will save it afterwards
only for this example to learn something.
#include <stdio.h>
The statement helps C program in
including the header files inside which
there are stand input and output
functions like printing and scanning
are
Example of function to print text on screen
printf(“Hi”);
main()
When the program starts execution
main () is the first function which will
be executed.
printf(“Hello n”);
• { All functions will start and end the
open & close curly braces.
}
• This line will call a function printf inside
the header file which will help in printing
the data inside double inverted comas
“anything” on the screen.
• n tells the complier to take a new line.
• ; a line in C must end with a semicolon
2
1
1
2
C programming on Ubuntu
C programming on Ubuntu
C programming on Ubuntu
C programming on Ubuntu
C programming on Ubuntu

More Related Content

What's hot

computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
ecomputernotes
 

What's hot (20)

Two C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp InsightsTwo C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp Insights
 
built in function
built in functionbuilt in function
built in function
 
Cpp
CppCpp
Cpp
 
Practical no 1
Practical no 1Practical no 1
Practical no 1
 
Applications of list
Applications of listApplications of list
Applications of list
 
Ternary operator
Ternary operatorTernary operator
Ternary operator
 
How c program execute in c program
How c program execute in c program How c program execute in c program
How c program execute in c program
 
Concept of c
Concept of cConcept of c
Concept of c
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Output
OutputOutput
Output
 
computer notes - Data Structures - 8
computer notes - Data Structures - 8computer notes - Data Structures - 8
computer notes - Data Structures - 8
 
C++ chapter # 1
C++ chapter # 1C++ chapter # 1
C++ chapter # 1
 
My first program in c, hello world !
My first program in c, hello world !My first program in c, hello world !
My first program in c, hello world !
 
Write a program that accepts percentage from the user and displays its grade ...
Write a program that accepts percentage from the user and displays its grade ...Write a program that accepts percentage from the user and displays its grade ...
Write a program that accepts percentage from the user and displays its grade ...
 
C programming Lab 1
C programming Lab 1C programming Lab 1
C programming Lab 1
 
Part II: 2-Dimensional Array file name: lab1part2.cpp (10 points) Write a C++...
Part II: 2-Dimensional Array file name: lab1part2.cpp (10 points) Write a C++...Part II: 2-Dimensional Array file name: lab1part2.cpp (10 points) Write a C++...
Part II: 2-Dimensional Array file name: lab1part2.cpp (10 points) Write a C++...
 
Rasperry pi Part 8
Rasperry pi Part 8Rasperry pi Part 8
Rasperry pi Part 8
 
C++ by shantu
C++ by shantuC++ by shantu
C++ by shantu
 
UNIT 4-HEADER FILES IN C
UNIT 4-HEADER FILES IN CUNIT 4-HEADER FILES IN C
UNIT 4-HEADER FILES IN C
 

Similar to C programming on Ubuntu

1 CMPS 12M Introduction to Data Structures Lab La.docx
1 CMPS 12M Introduction to Data Structures Lab La.docx1 CMPS 12M Introduction to Data Structures Lab La.docx
1 CMPS 12M Introduction to Data Structures Lab La.docx
tarifarmarie
 

Similar to C programming on Ubuntu (20)

Programming Fundamentals lecture 5
Programming Fundamentals lecture 5Programming Fundamentals lecture 5
Programming Fundamentals lecture 5
 
First Class
First ClassFirst Class
First Class
 
Basic of c programming www.eakanchha.com
Basic of c programming www.eakanchha.comBasic of c programming www.eakanchha.com
Basic of c programming www.eakanchha.com
 
C language tutorial
C language tutorialC language tutorial
C language tutorial
 
C - ISRO
C - ISROC - ISRO
C - ISRO
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
 
(Lect. 2 & 3) Introduction to C.ppt
(Lect. 2 & 3) Introduction to C.ppt(Lect. 2 & 3) Introduction to C.ppt
(Lect. 2 & 3) Introduction to C.ppt
 
The basics of c programming
The basics of c programmingThe basics of c programming
The basics of c programming
 
basic program
basic programbasic program
basic program
 
C notes.pdf
C notes.pdfC notes.pdf
C notes.pdf
 
C language industrial training report
C language industrial training reportC language industrial training report
C language industrial training report
 
Intro To C++ - Class 3 - Sample Program
Intro To C++ - Class 3 - Sample ProgramIntro To C++ - Class 3 - Sample Program
Intro To C++ - Class 3 - Sample Program
 
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part IIIntro To C++ - Class 03 - An Introduction To C++ Programming, Part II
Intro To C++ - Class 03 - An Introduction To C++ Programming, Part II
 
UNIT-II CP DOC.docx
UNIT-II CP DOC.docxUNIT-II CP DOC.docx
UNIT-II CP DOC.docx
 
5.Hello World program Explanation. ||C Programming tutorial.
5.Hello World program Explanation. ||C Programming tutorial.5.Hello World program Explanation. ||C Programming tutorial.
5.Hello World program Explanation. ||C Programming tutorial.
 
1 CMPS 12M Introduction to Data Structures Lab La.docx
1 CMPS 12M Introduction to Data Structures Lab La.docx1 CMPS 12M Introduction to Data Structures Lab La.docx
1 CMPS 12M Introduction to Data Structures Lab La.docx
 
C programming
C programmingC programming
C programming
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
 
How c/c++ works
How c/c++ worksHow c/c++ works
How c/c++ works
 

Recently uploaded

Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
AbrahamGadissa
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
Kamal Acharya
 
Antenna efficency lecture course chapter 3.pdf
Antenna  efficency lecture course chapter 3.pdfAntenna  efficency lecture course chapter 3.pdf
Antenna efficency lecture course chapter 3.pdf
AbrahamGadissa
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

fluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answerfluid mechanics gate notes . gate all pyqs answer
fluid mechanics gate notes . gate all pyqs answer
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Introduction to Casting Processes in Manufacturing
Introduction to Casting Processes in ManufacturingIntroduction to Casting Processes in Manufacturing
Introduction to Casting Processes in Manufacturing
 
fundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projectionfundamentals of drawing and isometric and orthographic projection
fundamentals of drawing and isometric and orthographic projection
 
Digital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdfDigital Signal Processing Lecture notes n.pdf
Digital Signal Processing Lecture notes n.pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptxCloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
Cloud-Computing_CSE311_Computer-Networking CSE GUB BD - Shahidul.pptx
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
Antenna efficency lecture course chapter 3.pdf
Antenna  efficency lecture course chapter 3.pdfAntenna  efficency lecture course chapter 3.pdf
Antenna efficency lecture course chapter 3.pdf
 
Laundry management system project report.pdf
Laundry management system project report.pdfLaundry management system project report.pdf
Laundry management system project report.pdf
 
Natalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in KrakówNatalia Rutkowska - BIM School Course in Kraków
Natalia Rutkowska - BIM School Course in Kraków
 

C programming on Ubuntu

  • 1. Writing C program in Ubuntu Computational Skills Practical B.E. First Semester Engineering
  • 2.
  • 3.
  • 4.
  • 5. At this point you should save your file as Eg: filename.c But we will save it afterwards only for this example to learn something.
  • 6. #include <stdio.h> The statement helps C program in including the header files inside which there are stand input and output functions like printing and scanning are Example of function to print text on screen printf(“Hi”);
  • 7. main() When the program starts execution main () is the first function which will be executed.
  • 8. printf(“Hello n”); • { All functions will start and end the open & close curly braces. } • This line will call a function printf inside the header file which will help in printing the data inside double inverted comas “anything” on the screen. • n tells the complier to take a new line. • ; a line in C must end with a semicolon
  • 9.
  • 10. 2 1
  • 11.
  • 12.
  • 13. 1 2