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 ...
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 –...
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”
Outp...
yantox_ska@yahoo.com
Single line comment
 // (double slash)
 Termination of comment is by pressing enter key
Multi lin...
yantox_ska@yahoo.com
1./* Hello, world program */
2.#include <stdio.h>
3.
4.int main()
5.{
6. printf("hello, ");
7. printf...
yantox_ska@yahoo.com
Type a program
Save it
Compile the program – This will generate an
exe file (executable)
Run the ...
yantox_ska@yahoo.com
Write a program to display your identity with a
form below :
----------------------------------------...
Upcoming SlideShare
Loading in …5
×

01 basic programming in c++

568 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
568
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
40
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

01 basic programming in c++

  1. 1. yantox_ska@yahoo.com Basic Programming in C++ Session 1
  2. 2. 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
  3. 3. yantox_ska@yahoo.com Basic Computer Model Von Neumann Architecture
  4. 4. yantox_ska@yahoo.com Programming Languages +1300042774 +1400593419 +1200274027 LOAD A ADD B STORE C C=A+B
  5. 5. yantox_ska@yahoo.com Creating Programs Source File (High-Level Languages) Object File (Machine Languages) Executable gcc –o hello hello.cnedit hello.c
  6. 6. yantox_ska@yahoo.com Program Structure C + +
  7. 7. yantox_ska@yahoo.com Structure of C + + Coding
  8. 8. yantox_ska@yahoo.com Input  scanf  getchar  gets Basic Commands C++ Output  printf  putchar  puts
  9. 9. 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++
  10. 10. 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++
  11. 11. 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
  12. 12. 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
  13. 13. 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

×