Please enable JavaScript.
Coggle requires JavaScript to display documents.
C (1.Introduction to Computers, the Internet and the web (computer…
C
1.Introduction to Computers, the Internet and the web
-
-
-
- Fortran, COBOL, Pascal and Ada
-
- Basic, visual basic, visual c++, C# and .NET
- Machine languages, Assembly languages and high-level languages
-
-
-
- the internet and the world wide web
- personal, distributed and client/server programming
-
- computers hardware and software
- Key software trend: object technology
- Typical C program development technology
-
-
-
-
-
-
- Notes about c and this book
-
-
- Structured program development in C
-
-
-
-
-
-
-
-
-
3.math library functions
-
-
-
-
fmod(x,y) remainder of x/y as a floating point
5.function prototypes
tells the compiler the type of data returned by the function, the number , type , order of parameters the function expects to receive
coercion of arguments, i.e.,
the forcing of arguments to the appropriate type
Data type
printf conversion
specification
scanf conversion
specification
long double %Lf %Lf
double %f %lf
float %f %f
unsigned long int %lu %lu
long int %ld %ld
unsigned int %u %u
int %d %d
unsigned short %hu %hu
short %hd %hd
char %c %c
-
- function call stack and activation records
When a program calls a function, the called function must know how to return to its
caller, so the return address of the calling function is pushed onto the program execution
stack (sometimes referred to as the function call stack). If a series of function calls occurs,
the successive return addresses are pushed onto the stack in last-in, first-out order so that
each function can return to its caller.
stack overflow
If more
function calls occur than can have their activation records stored on the program execution
stack, an error known as a stack overflow occurs.
- calling values by function and reference
-
reference allows changing of the original data so it should only be used when the function is trusted
-
- example : a game of chance
enum Status { CONTINUE, WON, LOST };
enum Status gameStatus; / can contain CONTINUE, WON, or LOST /
-
-
-
- character-handling library
-
-
-
-
-
-
-
-
-
-
int ispunct(int c);
if c is a printing character other than a space, digit, or a letter
-
-
- string-conversion functions
-
-
-
-
-
-
- C structures, Unions, Bit manipulations and enumerations
8.unions
unions contain two or more data types. Only one member, and thus one data type, can be
referenced at a time. It is your responsibility to ensure that the data in a union is referenced
with the proper data type.
-
- const qualifier with pointers
-
-
- Introduction to C programming
-
-
-
-
-