235x Filetype PPTX File size 0.31 MB Source: www.bu.edu
Information Services & Technology 09/08/2022
Outline
Goals
C/C++ History
Basic syntax
makefiles
Additional syntax
2
Information Services & Technology 09/08/2022
Goals
To be able to write simple C/C++ programs
To be able to understand and modify existing C/C++
code
To be able to write and use makefiles
3
Information Services & Technology 09/08/2022
Compiled vs. Interpreted Languages
Interpreted languages
when you type something, e.g., “x=y+z”, it is immediately converted
to machine language and executed
examples: Matlab, Python
advantage
lots off convenient features
disadvantage
can be slow and memory-intensive
4
Information Services & Technology 09/08/2022
Compiled (cont’d)
Compiled languages
examples: C, C++, Fortran
source code is written using a text editor
source code does nothing by itself – it’s just text
we will use source file suffix .cpp
source code must be processed through a compiler
translates source code into machine language
creates executable
this is the code that you actually run
like .exe file in Windows
5
Information Services & Technology 09/08/2022
C History
Developed by Dennis Ritchie at Bell Labs in 1972
Originally designed for system software
Impetus was porting of Unix to a DEC PDP-11
PDP-11 had 24kB main memory!
1978 book “The C Programming Language” by
Kernighan & Ritchie served as standard
Official ANSI standard published in 1989
Updated in 1999
6
no reviews yet
Please Login to review.