yantox_ska@yahoo.com
Basic Programming in C++
Session 1
yantox_ska@yahoo.com
C is developed by Dennis Ritchie
C is a structured programming language
C supports functions that enables easy
maintainability of code, by breaking large file
into smaller modules
Comments in C provides easy readability
C is a powerful language
Introduction to C Language
yantox_ska@yahoo.com
Basic Computer Model
Von Neumann Architecture
yantox_ska@yahoo.com
Programming Languages
+1300042774
+1400593419
+1200274027
LOAD A
ADD B
STORE C
C=A+B
yantox_ska@yahoo.com
Creating Programs
Source File
(High-Level Languages)
Object File
(Machine Languages)
Executable
gcc –o hello hello.cnedit hello.c
yantox_ska@yahoo.com
Program Structure C + +
yantox_ska@yahoo.com
Structure of C + + Coding
yantox_ska@yahoo.com
Input
 scanf
 getchar
 gets
Basic Commands C++
Output
 printf
 putchar
 puts
yantox_ska@yahoo.com
Input
 scanf(“%d”,&a);
 Gets an integer value from the user and stores it
under the name “a”
Output
 printf(“%d”,a)
 Prints the value present in variable a on the
screen
Basic Commands C++
yantox_ska@yahoo.com
Single line comment
 // (double slash)
 Termination of comment is by pressing enter key
Multi line comment
/*….
…….*/
This can span over to multiple lines
Comments in C++
yantox_ska@yahoo.com
1./* Hello, world program */
2.#include <stdio.h>
3.
4.int main()
5.{
6. printf("hello, ");
7. printf("worldn");
8. return 0;
9.}
Simple Program
yantox_ska@yahoo.com
Type a program
Save it
Compile the program – This will generate an
exe file (executable)
Run the program (Actually the exe created out
of compilation will run and not the .c file)
In different compiler we have different option
for compiling and running. We give only the
concepts.
Running a C Program
yantox_ska@yahoo.com
Write a program to display your identity with a
form below :
------------------------------------------------------
AUTO BIOGRAFI
------------------------------------------------------
Name : <nama>
Address : <alamat>
Place of Birth : <tmp_lahir>
Date of Birth : <tgl_lahir>
Hobby : <hobby>
------------------------------------------------------
Task 1

More Related Content

PPTX
C, C++, Java, Android
PPT
C to C++ Migration Strategy
PPT
History of c++
PPTX
C++ history session 00 history
PPT
Csc1100 lecture01 ch01-pt1
PPT
Csc1100 lecture01 ch01-pt1
C, C++, Java, Android
C to C++ Migration Strategy
History of c++
C++ history session 00 history
Csc1100 lecture01 ch01-pt1
Csc1100 lecture01 ch01-pt1

Similar to 01 basic programming in c++ (20)

PPTX
C-PROGRAMMING-LANGUAGE.pptx
PPTX
Introduction to C programming
PPTX
Programming in C and Data Structures.pptx
PDF
Introduction to C programming
DOCX
Let's us c language (sabeel Bugti)
PPTX
Introduction to c language
PPT
Introduction to programming with c,
PDF
College1
DOC
Introduction to C Programming - TCCI.doc
PPTX
C Programming fundamental concepts with uses
PPTX
Best Computer Institute in Pitampura, Delhi, Learn from Industry Experts.
PDF
Introduction-to-C-Programming - TCCI.pdf
PPT
c++ programming language Lecture 1-3.ppt
PPTX
Introduction to C Programming fjhjhjh.pptx
PPT
The smartpath information systems c pro
PDF
CS8251_QB_answers.pdf
PPTX
Master the Fundamentals of C Programming Language
PDF
Basic Information About C language PDF
DOC
Basic c
PDF
67404923-C-Programming-Tutorials-Doc.pdf
C-PROGRAMMING-LANGUAGE.pptx
Introduction to C programming
Programming in C and Data Structures.pptx
Introduction to C programming
Let's us c language (sabeel Bugti)
Introduction to c language
Introduction to programming with c,
College1
Introduction to C Programming - TCCI.doc
C Programming fundamental concepts with uses
Best Computer Institute in Pitampura, Delhi, Learn from Industry Experts.
Introduction-to-C-Programming - TCCI.pdf
c++ programming language Lecture 1-3.ppt
Introduction to C Programming fjhjhjh.pptx
The smartpath information systems c pro
CS8251_QB_answers.pdf
Master the Fundamentals of C Programming Language
Basic Information About C language PDF
Basic c
67404923-C-Programming-Tutorials-Doc.pdf
Ad

Recently uploaded (20)

PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
observCloud-Native Containerability and monitoring.pptx
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
Tartificialntelligence_presentation.pptx
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
The various Industrial Revolutions .pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
Web Crawler for Trend Tracking Gen Z Insights.pptx
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Hybrid model detection and classification of lung cancer
PPT
What is a Computer? Input Devices /output devices
PDF
Five Habits of High-Impact Board Members
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PPTX
Chapter 5: Probability Theory and Statistics
DP Operators-handbook-extract for the Mautical Institute
1 - Historical Antecedents, Social Consideration.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
observCloud-Native Containerability and monitoring.pptx
A review of recent deep learning applications in wood surface defect identifi...
Getting started with AI Agents and Multi-Agent Systems
Tartificialntelligence_presentation.pptx
Enhancing emotion recognition model for a student engagement use case through...
The various Industrial Revolutions .pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Web Crawler for Trend Tracking Gen Z Insights.pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Hybrid model detection and classification of lung cancer
What is a Computer? Input Devices /output devices
Five Habits of High-Impact Board Members
NewMind AI Weekly Chronicles – August ’25 Week III
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Chapter 5: Probability Theory and Statistics
Ad

01 basic programming in c++