[FINAL] CCProg1 Midterms

studied byStudied by 2 people
0.0(0)
Get a hint
Hint

Syntactical errors

1 / 163

flashcard set

Earn XP

Description and Tags

164 Terms

1

Syntactical errors

caused by deviating from grammatical rules of the language

New cards
2

Logical errors

caused due to faulty algorithm formulation

New cards
3

Compile errors

errors that occur when syntax errors are encountered while translating the program code into a form that the physical computing machine can understand

New cards
4

Run-Time errors

the effect of logical errors; appears during the execution of the program

New cards
5

User’s manual

step by step instruction on how to use the program

New cards
6

Internal Documentation

comments included in program regarding how program was designed and created

New cards
7

Technical Manual

printed details on how the program was designed and created

New cards
8

Algorithm

a list or sequence of steps that will solve the given problem

New cards
9

Flowchart

a graphical representation of a list or sequence of steps to solve the given problem

New cards
10

Coding

converting algorithm or flowchart to actual code in a
programming language

New cards
11

Encoding

process of entering the program through a computer terminal directly into computer memory

New cards
12

Bugs

errors in a code

New cards
13

Debugging

the process of removing or correcting the bugs or errors in the program

New cards
14
<p>ellipse</p>

ellipse

start and end of a program

New cards
15
<p>arrow</p>

arrow

points to the next step/ activity to be done

New cards
16
<p>parallelogram</p>

parallelogram

input and output

New cards
17
<p>rectangle</p>

rectangle

process to be done

New cards
18
<p>diamond</p>

diamond

decision/ choice of yes or no

New cards
19

Numeric Constants or Literals

Whole numbers (integers), Real numbers (floating-point), and Exponential representation

New cards
20

Rules for defining numeric constants

  1. No comma.

  2. No space between the unary sign and digits.

  3. Begins and end with a digit.

New cards
21

Character Constants

single characters enclosed in single quotes

New cards
22

String Literals

series of characters enclosed in double-quotes

New cards
23

Identifiers

descriptive names for variables, constants, and other entities

New cards
24

Rules for defining identifiers

  1. Must consist of letters, digits, and underscore.

  2. Cannot start with a digit.

  3. Cannot redefine standard library identifiers.

  4. Case sensitive.

New cards
25

Variables and Data Types

store values that can change during program execution

New cards
26

Constants

entities with fixed values and is defined using preprocessor directive #define

New cards
27

Keywords and Separators

reserved words with special meanings in C

New cards
28

Comments

non-executable text for code explanation, improving readability

New cards
29

Functions

group of instructions in C that performs a  particular task, or as the name implies, performs a specific function

New cards
30

Library

a collection of different functions

New cards
31

Predefined functions

built-in functions in standard libraries

New cards
32

User-defined functions

created functions in own library

New cards
33

Conditional Statements

statements that check certain conditions before executing certain statements

New cards
34

If-statement

either logical or relational expressions; 0 for false and 1 for true

New cards
35

Switch statements

can only check equality relationships

New cards
36

Syntax of switch statements: Expression

whose value is being tested; only expressions that evaluate to a character or integer types are allowed

New cards
37

Syntax of switch statements: Labeli

value that the expression is checked against

New cards
38

Syntax of switch statements: Statementi

the statement that will be executed if the <expression> is equal to the value in the <label i>

New cards
39

Syntax of switch statements: Break

prevents the execution of the next statements; exits from the switch statement

New cards
40

Syntax of switch statements: Default

counterpart of an ‘else statement‘

New cards
41

What is the meaning of this operator: ==

equal to

New cards
42

What is the meaning of this operator: <=

less than or equal to

New cards
43

What is the meaning of this operator: >=

greater than or equal to

New cards
44

What is the meaning of this operator: !=

not equal to

New cards
45

What is the meaning of this operator: &&

and

New cards
46
<p>What is the logical operator of this?</p>

What is the logical operator of this?

&&

New cards
47

What is the meaning of this operator: ||

or

New cards
48
<p>What is the logical operator of this?</p>

What is the logical operator of this?

||

New cards
49

What is the meaning of this operator: !

not

New cards
50
<p>What is the logical operator of this?</p>

What is the logical operator of this?

!

New cards
51
L8r

Valid

New cards
52
star*ting

Invalid

New cards
53
num_Values

Valid

New cards
54
"hello"

Valid

New cards
55
0.85

Valid

New cards
56
'\'

Invalid

New cards
57
+35, 480

Invalid

New cards
58
`a`

Invalid

New cards
59
.75

Valid

New cards
60
"'"

Valid

New cards
61
'/n'

Invalid

New cards
62
''

Invalid

New cards
63
'"'

Valid

New cards
64
-1,000,000

Invalid

New cards
65
4e5

Valid

New cards
66
1 234

Invalid

New cards
67
"\\"

Valid

New cards
68

““

Valid

New cards
69
5e-7

Valid

New cards
70
-54

Valid

New cards
71
10 + 23 % (17 – 4 * 2) / (24 – (7 + 15 % 2))

10

New cards
72

 150 - (-6 + 8 * 4 – 22 % 4) – (5 – (15.2 / 2))

128.6

New cards
73
2 – 4 * 3 + 26 / 2

3

New cards
74

 (3 + 4) * 2.0 / 2 + 3.0

10.0

New cards
75
5 + 6.6 / 2.2 * 0.5

6.5

New cards
76
(x – y) <= ((j – k) – 1)

i = 1, j = 2, k = 3, x = 5.5, and y = 7.7

TRUE

New cards
77

 (k + j) != (i + 1 * 4)

i = 1, j = 2, k = 3, x = 5.5, and y = 7.7

FALSE

New cards
78

 i && j

i = 1, j = 2, k = 3, x = 5.5, and y = 7.7

TRUE

New cards
79

 i == j && i + j == k || y == x + 2 

i = 1, j = 2, k = 3, x = 5.5, and y = 7.7

FALSE

New cards
80
–i <= j – k && !j

i = 1, j = 2, k = 3, x = 5.5, and y = 7.7

FALSE

New cards
81

number of students

int

New cards
82

GPE (grade point equivalent)

float

New cards
83

sex (M for male and F for female)

char

New cards
84

discounted price

float/ double

New cards
85

value of PI (with 200 decimal places)

double

New cards
86

tab character

‘\t‘

New cards
87

newline character

‘\n‘

New cards
88

character 8

‘8‘

New cards
89

real number value of 1/2

0.5

New cards
90

integer twenty thousand and three

20003

New cards
91

string Taft Avenue

“Taft Avenue“

New cards
92

real number 8

8.0

New cards
93

null string or empty string

““

New cards
94
'/n'

not a valid literal

New cards
95

“8“

string

New cards
96

\a

alert

New cards
97

\\

backslash

New cards
98

\’

single quotation mark

New cards
99

\”

double quotation mark

New cards
100

\t

tab

New cards

Explore top notes

note Note
studied byStudied by 9 people
... ago
5.0(1)
note Note
studied byStudied by 6 people
... ago
5.0(1)
note Note
studied byStudied by 15 people
... ago
5.0(1)
note Note
studied byStudied by 3 people
... ago
5.0(1)
note Note
studied byStudied by 113 people
... ago
5.0(6)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 18 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (40)
studied byStudied by 134 people
... ago
5.0(1)
flashcards Flashcard (64)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (66)
studied byStudied by 61 people
... ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 38 people
... ago
5.0(1)
flashcards Flashcard (42)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (42)
studied byStudied by 5 people
... ago
5.0(2)
robot