การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
Upcoming SlideShare
Loading in...5
×
 

การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)

on

  • 109 views

 

Statistics

Views

Total Views
109
Views on SlideShare
109
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

การเข ยนคำส _งควบค_มข__นพ__นฐาน (1) การเข ยนคำส _งควบค_มข__นพ__นฐาน (1) Presentation Transcript

  • (cos) (Windows) BCLP B (Bell Laboratoorics) The C Programming Language 1988
  • (Source Program) c work.c 2. (Compile) (Build) (Link) printf() .exe
  • (Header File) main( ) h. #include<header_name> header_name printf #include <stdio.h>
  • (Main Function) { } main( ) 2.3 1. { } main {} 2. 3. (:) 4. 1 1 1
  • (identifier) (address)
  • : data_type var data : var_type var name
  • 1 ,
  • input process output printf :
  • : String _format %d Address_list & Ampersand : expreeion : var
  • x y Printf “data x = “ scant “%&x : Printf “data = “ scant “%&y : 2. R = 2+3 * ; S= 2+3 * ; T= 2+3 * - ; Printf “ r=x+y*2=%dn”,r : Printf “ r= x+yX*2=5dn”,s : Printf “ r=x+y*2-1 =%dn”,t :
  • 1 (char) 5.1 putchar ( ) 5.2 getchar ( ) 5.3 getch ( ) 5.4 getche ( ) 5. putcar ( ) 1 Putchar_argument
  • 1. ‘A’ char word1 „1‟ word2 char word1=„A‟ , word2=„1‟ 2. 1 putchar(word1); putchar(word2); A1 5.2 getchar ( ) 1 Enter 1
  • 1. Printf (“Key 1 Character=”) ; Word = getchar ( ) ; 1 a Enter char word 2. word a ( word) Printf (“You key Character is =%cn”,word) ; 5.3 getch ( ) 1 Enter 1 2 char_var
  • 1. printf (“Key 1 Character =” ) ; word = getch ( ) ; 1 a Enter 2. word a ( word) printf (“Key 1 Character =%cn”,word ) ; char word
  • 5.4 getche ( ) 1 Enter 1 2 char_var
  • 1. printf (“Key 1 Character =” ) ; word = getcher ( ) ; 1 a Enter char word 2. word a word) printf (“Key 1 Character =%cn”,word ) ;
  • (String) char[n] 6.1 puts() 1 string_argument
  • 1. word Char word [15] = “*Example*”; 2. puts Puts (word) ; Puts (“*************”); 6.2 gets( ) Enter 1 2
  • 1. Enter gets (word); 2. printf (You name is = %sn”,word) ;