Computer Programming 3

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/128

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

129 Terms

1
New cards

Program

a collection of text that commands a computer to perform algorithms.

2
New cards

Programming Language

collection of rules and syntax use to describe a program. It is employed based on the user's objective and the computers format and usage.

3
New cards

Programming

An act of writing algorithms while utilizing a programming language.

4
New cards

Low-level Language

programming languages writteni n a format that is easy for computers to interpret

5
New cards

High-Level Language

programming languages written in a format that resembles human language and diminishes user awareness of hardware devices

6
New cards

- Machine Language

- Assembly Language

Example of Low-level language

7
New cards

- C++

- Java

- FORTRAN

- COBOL

- Phython

- ABAP

examples of high-level language

8
New cards

C++ Language

a general purpose programming language with a bias towards systems programming that

9
New cards

- C++ is the better c

- C++ supports data abstraction

- C++ supports generic and object oriented programming

- C++ is case sensitive

C++ is?

10
New cards

Pre-processor Directive

#include

11
New cards

Pre-processor Directive

instructs the compiler to locatethe file that contains code forthe library

12
New cards

using namespace std;

allows you to use cout and endl without the prefix std::

13
New cards

int main ()

Entry point for the application when program execution starts.

14
New cards

cout << "Welcome" << endl;

Body of the program

15
New cards

Body of the program

where the content is located or written

16
New cards

return 0;

Used to end a function or method when a value is expected to be sent back to acaller

17
New cards

Source Code/Source Program

A program written in a high-level language, created in the text editor.

Note: the program must be saved in the text file that has theextension .cpp

18
New cards

Pre-processor Directive

statements that begin with the symbol # processed by preprocessor program.

19
New cards

iostream

contains the descriptions of the functions needed to perform input/output (I/O)

20
New cards

cmath

contains the descriptions of some very useful mathematical functions, such aspower, absolute, and sine

21
New cards

iomanip

contains the specifications of many useful functions and manipulators that help you format your output in a specific manner

22
New cards

Compiler

Checks the source program for syntax errors and translates the entiresource programs into the equivalent machine language with anexecutable format.

- A complete set of machine language is executed after translation, resulting in a program that runs faster than a program translated by an interpreter.

23
New cards

Interpreter

executed program while translating one command at a time from source program into machine language. The translation and execution processes repeat for each command,resulting in a program that runs slower than a program translated by a compiler

24
New cards

Object Program

the machine language version of the high-level programming language

25
New cards

Linker

A program that combines the object program with other programs in the library, and is used in the program to create the executable code.

26
New cards

Loader

Loads the executable program into main memory for execution

27
New cards

Execution

Process by which a computer or virtual machine executes the instructions of a computer program

28
New cards

Value

representation of an entity that can bemanipulated by a program and is classified based ondifferent data types

29
New cards

Variable

a one-word name that points to a value.

30
New cards

Data Type

determines the type of data that a variablecan hold.

31
New cards

Primitive Data Type

Data types that are built-in or predefined and can be used directly bythe developer to declare variables.

32
New cards

integer

Data type that deals with integers or numbers without decimal part

33
New cards

int

keyword for integer

34
New cards

Floating point

Single precision data type that deals with decimal numbers

35
New cards

float

keyword for floating point

36
New cards

7

max number of decimal places for floating point

37
New cards

Double Floating Point

Double precision data type that deals with decimal numbers.

38
New cards

double

keyword for double floating point

39
New cards

15

max number of decimals for floating point

40
New cards

Boolean

Data type used to store Boolean or logical values.

41
New cards

bool

keyword for boolean

42
New cards

True or False

example of boolean

43
New cards

Character

Data type used to represent characters (letters, digits,special symbols).

44
New cards

char

keyword for character

45
New cards

Wide character

A character data type but has size greater than the normal 8-bit datatype

46
New cards

wchar_t

keyword for wide character

47
New cards

2

char storage in bytes

48
New cards

1

bool storage in bytes

49
New cards

4

int storage in bytes

50
New cards

2

short storage in bytes

51
New cards

4

long storage in bytes

52
New cards

String

a sequence of zero or more characters and isenclosed in a double quotation marks.

53
New cards

13

what is the length of the string for William Jacob

54
New cards

6

what is the length of the string for mickey

55
New cards

ctrings

one-dimensional arrays of characters terminated bya null character '\0'

56
New cards

strcat

concatenates string s2 onto the end of string s1

57
New cards

strncat

concatenates string s2 onto the end of string s1 up to n characters

58
New cards

strcmp

compares the two strings lexicographically and returns the following values:0 if s1 and s2 are the same;

less than 0 if s1< s2;

greater than 0 if s1>s2.

59
New cards

strcpy

copies string s2 into string s1

60
New cards

strncpy

copies string s2 into string s1 up to n characters

61
New cards

strlen

returns the length of a string

62
New cards

Derived Data Type

Data types that are derived from primitive data types.

63
New cards

Function

Block of code or program-segment that isdefined to perform a specific well-defined task.

64
New cards

Array

Collection of items stored at continuous memory locations.

65
New cards

Pointers

Symbolic representation of addresses that enable programs to simulate call-by-referenceas well as to create and manipulate dynamic data structures.

66
New cards

Reference

Alternative name for an existing variable.

67
New cards

Abstract Data Type

Also known as user-defined data types, these are data types defined bythe developer, himself.

Examples: class, structure, union and enumeration

68
New cards

Operators

symbols that denote calculation, relationship, comparison and operations on operands.

69
New cards

Constant

memory location whose content is not allowed to change during program execution.

70
New cards

Token

smallest individual unit of a program written in any language

71
New cards

Special Symbols

Consists of operators in a form of mathematical symbols, punctuation marks or two characters regarded as a single symbol.

72
New cards

Arithmetic Operators

Operators used to perform mathematical operationslike addition, subtraction, multiplication and division.

73
New cards

x + y

Addition

74
New cards

x - y

Subtraction

75
New cards

x * y

Multiplication

76
New cards

x / y

Division

77
New cards

x % y

Modulus

78
New cards

x ++

Increment Increase

79
New cards

x --

Increment Decrease

80
New cards

++ X

Pre increment

81
New cards

-- x

pre decrement

82
New cards

x ++

post increment

83
New cards

x --

post decrement

84
New cards

>

Greater than

85
New cards

<

less than

86
New cards

==

equal than

87
New cards

!=

not equal to

88
New cards

>=

greater than or equal to

89
New cards

<=

lesser than or equal to

90
New cards

Logical operators

Operators used to perform logical AND, OR and NOT operations.

91
New cards

&&

logical and

92
New cards

||

logical or

93
New cards

!

logical not

94
New cards

Assignment Operators

Operators used to assign values to the variables.

95
New cards

x = y + z

assign value of the right side of expression to left side operand

96
New cards

x+=y

x=x+y

add and

97
New cards

x-=y

x=x-y

subtract and

98
New cards

x*=y

x=x*y

multiply and

99
New cards

x/=y

x = x/y

divide and

100
New cards

x%=y

x=x%y

modulus and