Section 7
No description yet. This curated deck is ready for daily study.
Card preview (21)
What are variables?
Any data that a program uses which is stored in memory locations, has its own identifier, and has values in locations which may change when running
What is an identifier?
• Refers to location in memory where the data item is stored
What is a data type?
• Defines type of data that will be stored at the memory location and therefore the operations that can be performed on it
What are the data types?
integer - whole number real/float - number with fractional part char - single character (letter, digit, punctuation mark, symbol) string - zero or more characters, can be null boolean - value of true or false
How are values assigned to variables?
Using an = sign
What is casting?
Changing the type of variable value from one type to another
What is concatenation?
Joining two strings together with +
What type of length does an array have?
Fixed Length
What is an array?
Group of fata items of the same data type
What does each box in an array include?
• Numerical reference called a subscript or index
What is a subroutine or sub-program?
Self- contained section of code that performs a specific task
What are the two types of subroutine?
• Procedures • Functions
How can you make a procedure more useful?
Pass it one or more parameters
What is a parameter?
Variable named in procedure heading that will receive and use whatever value you pass it
What is the main difference of a function compared to procedure?
Always return a value
What are variables declared or used in the main program called?
Global Variables
What are advantages of subroutines?
• Decompose large problem into small tasks • Tested • Used several times • Stored in library • Work at same time • Maintenance easier
What is it called when we group data items together?
• Data structure • Treated as a set of data
Where can data be stored other than variable for permanent?
• File • Held permanently on disk • Read next time needed
What is the format for a SQL command?
SELECT WHERE FROM ORDER BY