?1? C ???? - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

?1? C ????

Description:

Title: PowerPoint Author: NEC Last modified by: wds Created Date: 5/27/2003 6:14:28 AM Document presentation format: – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 25
Provided by: NEC80
Category:
Tags: bcpl | powerpoint

less

Transcript and Presenter's Notes

Title: ?1? C ????


1
?1? C????
2
??????
  • ????????????????
  • C?????
  • C??????????????
  • C?????
  • C???????

3
1.1 ??????
4
????????????,?????(?????)??????,?????????????,???
????????(Programming Paradigm)???????????????????
??????????????????????
1.1.1 ??????
5
1. ???????(Structural Programming) ????????????
????,??????????????????????,???????,??????????????
????????????,???????????????????????????,?????????
???,?????????????????????,????????????????????????
????????????,????????,???????,???????,????????????
???1-1?????????????? ?? ??
???? (1-1)
6
  • 2. ????????(Object-Oriented Programming)
  • ?20??70??,?????????,???????????????????????,????
    ????????????????????????????,?????????????????????
    ???????????,???????????????????????????,??????????
    ??,???????????????????????????????????????????????
    ????????????
  • ?? ??/? ??/?
  • ??/? ?? ??

7
3. ??????(Generic Programming) ????,????????????
????????????????????????,?????????????,???????????
?????????????????????????????????????????????,???
?????????????C??????????,???????????????????,??
?????????????????????????????????????????????????
??????????????????????????,????????????????????
8
1.1.2 ??????
9
1.???? ??????????????????CPU?????????????,?Intel
CPU?AMD CPU??????????????????????Intel
CPU,?286?386?486?586??Core2,?????????????????????
CPU???????????????????CPU????????????CPU????????
10
  • 2. ????
  • ???????????????,???????????????????????????????
    ??????????,??,?ADD????,MOV?????????????,??????
    ??????????,???????????,????????????????
  • ??,???????????????????????????????,?????????????
    ?????????,?????????????????????????,??????????????
    ???????????,????????????????,?????????????(???????
    ????????????)????,??????????????????

11
  • 3. ????
  • ???????????,?????????????,??????????,???????????
    ?????????,???????????????,??????????????,?Fortran?
    Basic?Pascal?Java?C?C??

12
  • ?????????????????,??????????????????????????????
    ????????????,?????????????????????????????????????
    ????????????????????????????????,?????????????????
    ??????????,???????????,?????????????,?????????????
    ???????????????,????????????????????

13
1.2 C???????
C??????????????????????????????????????????????
????????????,?????????,????????????20??80?????????
?C??????,??????????????????????
14
C ???????? Algol60,1963?,?????Algol60????
CPL(Combined Programing Language) 1967?,?????Mat
in Richards?CPL???????,???BCPL?? 1970?,????????K
en Thompson?BCPL?????,?????B??,?????CPL???(Boiling
CPL down to its basic good features),?? B
??????? UNIX ?? 1973?,ATT??????Dennis
Ritchie(D.M.RITCHIE)?BCPL?B????????????????,?BCPL?
????????,????????C??? 1979?,C??Bjarne
Stroustrup????????????Simula?????,???????C??,???
????????,????????C???C?????????????C??????,???????
?????,?????C????????????C?????,????C? 1998
?,ANSI ? ISO ????C???????????????,???????C????
???ISO/IEC98-14882,???????C?????????,??????????
15
1.3 ??C???????
? ??C???????? /?????/ include
ltiostreamgt using namespace std int main ()
cout ltlt "welcome to C world!\n" return 0
????
16
? ?????????,??????????? include ltiostreamgt using
namespace std int main() int x int y
//???????? cout ltlt "???????,?????,????(Enter)"
cin gtgt x gtgt y //????????? cout ltlt "add" ltlt
xy //???????????? return 0 ????
17
? ?????????,??????????????,???? include
ltiostreamgt using namespace std int add(int a,
int b) return (ab) int main() int x int
y int sum //????????x,y,sum cout ltlt
"???????,?????,????(Enter)" cin gtgt x gtgt y
//????????? sum add(x, y) //????add?x,y?? cou
t ltlt "add"ltlt sum return 0
18
C??????? (1) ???,??C??????????????/????,?????
C??????????main??,main???C?????,?????????? (2)
C????????????,?????????????,????????????????? (
3) ???,??C???????????C???(????.cpp???)?,??????
???????????????/??????? (4) ???????,??????????,???
?include?????????
19
1.4 C???,???,???
20
1.4.1 ???
C???????26?????????10???????????????? ????AZ
?az ????09 ?????? ! _ -
lt gt / \ . , ? ' ?( )
21
1.4.2 ???
C????????????? (1) ?????????????????????? (2)
????????????????_,????????????,Abc?X1?x1?_x1?x2?
x3?desk?books?????????,?5you????????,?you5?You5?_y
ou5????????? (3) ?????????????,x1?X1???????? (4)
????????1-1???????,????????????,????????????
22
1.4.3 ???
???????????????,??C???????????,????????????.
C??????????.
asm auto bool break case catch
char class const const_cast continue default
delete do double dynamic_cast else enum
explicit export extern false float for
friend goto if inline int long
mutable namespace new operator private protected
public register reinterpret_cast return short signed
sizeof static static_cast struct switch template
this throw true try typedef typeid
typename union using unsigned virtual void
while volatile wchar_t
23
1.5 C?????????????
24
(1) ???????,?????????????????????????????????????
????????????????(source programm)?C??????.cpp(cp
p?c plus plus???)?????????????,??????????(?Windows
??????????),?C????????????,??.cpp?????????(????)
????????.h????(????? header file),????????????????
??????????,?iostream??? (2) ???????CPU?????0?1???
??????????,????????????????,?result ab c
-d???,????C???(compiler,????????????)??????????
???????????????,????????,???????????.obj(object??
?)? (3) ?????C??????????????????,??????????????
?????,????????????????,??????????(linker,??????)??
??????????????????????????????????????(???????)???
?,???????????????,???????????.exe? (4)
?????????????????????,??????????,??????????
Write a Comment
User Comments (0)
About PowerShow.com