Computer Programming

5.0(1)
studied byStudied by 46 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/46

flashcard set

Earn XP

Description and Tags

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

47 Terms

1
New cards

Computer Programming

It means giving instruction or directions to accomplish specific task

2
New cards

Programmers

people who write computer programs

3
New cards

Programming Language

programmers use a specific language called _______ to communicate with the computer

4
New cards

9000+

there are approximately ______ programming languages used by software and web developers and other professionals

5
New cards

Compiler

converts programming language program to machine language

6
New cards

Interpreter

converts programming languages to machine language line by line

7
New cards

C. source code—compiler—assembler—machine code

How it works: code translator from source code to executable output
A. source code—assembler—-compiler——machine code

B. source code—machine code—compiler—-assembler

C. source code—compiler—assembler—machine code

8
New cards

Machine Language

  • Instructions written in 0s and 1s are called _______. ___________ language (each type of machine has its own language) represent the only way to communicate directly with the computer.

  • low level languages and can directly understand by computer but difficult to ready by humans

9
New cards

Assembly language

  • it simplify the programmer’s job by allowing the programmer to use mnemonics in place of the 0s and 1s in the program.

  • a representation of machine language. these are instructions translates to machine language instruction called assembler

10
New cards

High level language

  • It represent the next major development in programming languages. These languages are a vast improvement over machine and assembly language because they allow the programmer to use instructions that more closely resemble the English language.

  • these are mostly used by programmers today. these are easy to read and portable. it can be classified into functional, procedure oriented, object oriented, programming and logic programming languages

11
New cards

Step 1: Analyze the problem- problem outline and list of requirements

Step 2: Plan the algorithm- design algorithm using pseudo-code, IPO and flowcharts

Step 3: Check the algorithm- trace algorithm.

Step 4: Code the algorithm into a program- implement algorithms into code.

Step 5: maintenance: evaluate and modify the program if necessary. IPO chart is also applicable

steps in problem solving process

12
New cards

Algorithm

step by step solution to solve a problem or to accomplish specific task

13
New cards

Flowchart

graphical representation of algorithm. there are symbols and illustration to use

14
New cards

Pseudo code

tool to plan the algorithm and use short English statements.

The short English statements that represent an algorithm are called _________

15
New cards

programs

instruction given to a computer

16
New cards

IPO chart

use to organized the result of program analysis

17
New cards
<p>Process</p>

Process

indicates any type of internal operation inside the Processor or memory

18
New cards
<p>input/output</p>

input/output

used for any _____/______ operation. indicates that the computer is to obtain data or output results

19
New cards
<p>Decision</p>

Decision

used to ask a question that can be answered in a binary format (yes/no, true/false)

20
New cards
<p>Connector</p>

Connector

Allows the flowchart to be drawn without intersecting lines or without a reverse flow.

21
New cards
<p>Pre-defined Process</p>

Pre-defined Process

Used to invoke a subroutine or an interrupt program.

22
New cards
<p>Terminal</p>

Terminal

Indicates the starting or ending of the program, process, or interrupt program.

23
New cards
<p>Flow lines</p>

Flow lines

shows direction of flow

24
New cards

Integer 4 bytes

int

25
New cards

float 4 bytes

float

26
New cards

double 8 bytes

double

27
New cards

boolean 1 byte

bool

28
New cards

character 1 byte

char

29
New cards

string 1 byte per character

string

30
New cards

identifiers

All C++ variables must be identified with descriptive unique names.

These unique names are called

31
New cards

•Names can contain letters, digits, and underscores

•Names must begin with a letter or an underscore (_)

•Names are case sensitive (myVar and myvar are different variables)

•Names cannot contain whitespaces or special characters like !, #, %, etc.

•Reserved words (like C++ keywords, such as int) cannot be used as names

The general rules for naming variables are:

32
New cards

==

equal to

33
New cards

! =

not equal to

34
New cards

<

less than

35
New cards

<=

less than or equal to

36
New cards

>

greater than

37
New cards

>=

greater than or equal to

38
New cards

true + true = true
true + false = false

false + true = false

false + false = false

&&

39
New cards

true + true = true
true + false = true

false + true = true

false + false = false

||

40
New cards

Sequence Structures

  • In a computer program, the _________ structure directs the computer to process program instructions, one after another, in the order listed in the programs.

  • a series of actions that is completed in a specific order. Action 1 is performed, then Action 2, then Action 3, etc,. until all of the actions in the sequence have been carried out.

41
New cards

Selection

indicates that a decision (based on some condition) needs to be made followed by an appropriate action derived from that decision.

42
New cards

Repetition

  • last of the three control structures. It directs the computer to repeat one or more instruction until some condition is met, at which time the computer should stop repeating the instructions. This structure also is referred to as a loop or an iteration.

  • or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next.

43
New cards

Control Structures

All computer programs, no matter how simple or how complex, are written using one or more of three basic structures: Sequence, Selection, and Repetition. These structures are called __________ or logic structures because they control the flow of a program’s logic.

44
New cards

while loop

The loop construct in C++ is used when the number of iterations is known beforehand is called _________

45
New cards

braces

In a C++ program, the body of a function is enclosed in ______

46
New cards

false

true && false

47
New cards

true

true || false