[go: up one dir, main page]

0% found this document useful (0 votes)
11 views4 pages

Overview For Final Exam

The document provides an overview of the C programming language, including its history, syntax, tokens, data types, and control flow structures. It also covers basic concepts of computer networks, operating systems, and algorithms, emphasizing the importance of problem-solving and software development. Key topics include keywords, expressions, pointers, arrays, and input/output functions in C.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Overview For Final Exam

The document provides an overview of the C programming language, including its history, syntax, tokens, data types, and control flow structures. It also covers basic concepts of computer networks, operating systems, and algorithms, emphasizing the importance of problem-solving and software development. Key topics include keywords, expressions, pointers, arrays, and input/output functions in C.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Part 2: The C Programming Language 2/Tokens: syntax = grammar rules, have 6

kinds of tokens in C
Unit 1 Overview of C language
Keywords (write in small letter):
C developed by Dennis Ritchie, in
1970s Asm, auto, const, enum, extern,
long, register, short, sizeof, static,
C++ developed by Bjarne, in 1980s
struct, typedef, union, unsigned,
(C is subset of C++) volatile.

Standard Break, case, continue, default, do,


else, for, goto, if, return, switch,
Integer: int a,b (certain max value)
while.
short int<int<long int
Char, double, float, int, signed, void.
Rational: float c,d (limit of digits)
Constants
float<double<long double
Integer Constants: decimal (25),
Bug: mistake in program octal (056), hexa (0x7DB)

Debug: eliminating mistakes Floating Constants: decimal notation


(3.1357) and scientific notation (31.4
Stdio.h: perform in and output
E-2)
<stdio.h>: scanf() and printf()
3/Expressions
functions
4/Opertator precedence: C operators
Math.h: math function
Arithmetic: +a, -a , *, /, %, +, -
Basic components of C pr
Bitwise: AND (&), XOR, OR (|), NOT,
Symbols/ key words/
Shift(<<,>>)
identifiers/data types/ constants/
variables/ operators/ expressions/ Logical:
functions/ comments.
== equal to, !=not equal to, ! not,
Symbols: C consists of: 26 capital && AND, || OR
letter (A,B,C..)/ 26 small letter
> greater than, < less than, >=, <=
(a,b,c..)/ 10 digits (0,1,..9)/ math
operators: + - */=<> Relational: 0 = False, non zero(1) =
True
Unit 2 Tokens, Data Types and Expressions
Increment(tang) and
Contents
Decrement(giam) Operators:
1/Character set = symbols
a++: incr 1, a--: decr
++a: incr 1, --a: decr For loop
5/Data types While loop
6/Type conversion Do… while loop
Unit 3 Input and Output Functions, Expression
Declaration
Logical expressions: 6 relational
Declaration (<,>,<=,>=,==,!=), 3 logical (!, &&, ||)
Syntax: const identifier = expression; Unit 5: Pointers and Arrays
(ex: const double HK2TW = 3.98)
One variable has: address and value
Unit 4: the control flow
Pointer declaration: type*name;
Selection
p -> a => synatx: int a=5; int *p=&a:
If: if(expression) statememnts printf(“%x %d”, p,a);
If… else: if(expression) statement 1 Pointer operator: &(address)
else statement 2
Arrays (problem solving need in4mation be
Switch: break to end, without break viewed as a list): [a]
-> continue to next statement
Int A[10] // array of 10 ints A[0], …
(break: skips any statements A[9], first element is A[0]
between the break and bottom of
Functions in C
loop; continue: skips any statements
between the continue and bottom) If nothing returned: return;
Switch (expression) { If something returned: return
expression;
Case calue1: statement1
Unit 6: Strings
Case calue2: statement2
Character strings
/more cases/
Char: onechar = ‘z’
Default_statements
char color [8] = {‘s’, ’c’,.., ‘\0’};
}
String library: #include <string.h>
While (expr) statement
Do statement while (expr)

For (expr1, expr2, expr3) statement


Repetition (sự lặp lại)
Part 1: Computer Getting start: start (menu, taskbar, screen),
using help and support, shut down windowns
Unit 1.4: Computer network, operating
systems Navigating window: parts, menus, dialog,
toolbars
Contents
Control panel
1/ concept of computer network
Set date and time
Connect between computers in a
network: cable, wireless Changing mouse, keyboard properties

2/ classification Set up printer

By network layer Managing fonts

By scale Chang taskbar

LAN: Local Area Network (connet close area) Adjust screen

WAN: Wide Area Network (connect over large Managing files, folders, disks
distance)
Navigating folders
MAN: Metropolitan Area Network (develop for
Manipulate file
a large city)
Searching files
GAN: Global Area Network
Working with recycle bin
By connection method
Format disks
By functional relationship
Copy file, setting file management
Client/ server
Running program
Peer to peer
Working with word, excel, notepad
By network topology
Add, remove windows components
Rule of communication
Install, remove programs
By protocol
Unit 1.5: Algorithm and Software
3/ major components
Contents
4/ the internet
1/ Problem solving on computer:
5/ introduce to operating systems
3 important:
6/ functions
Algorithm development:
7/ microsoft windows
analyze, propose, test
Win 1.0 in 1983
Implementation: code, test
Maintenance: correct errors/
modify program

2/ Algorithm

Ex: Shampoo Algorithm

Step 1: set count = 0

Step 2: wet hair…

Step 3: …

Step end: exit

3/ Represent algorithm

4/ Programs

5/ Classification software

6/ Disciplines of cpt science

You might also like