Flashcards
ipc mid
Cards in this deck (43)
- 1main(void)-entrypoint of the program
-loads the program into ram so that it can be accessed by the OS
-void means that it returns nothing - 2arithmetic types-char
-int
-long
-long long - 3alu int typesarithmetic
relational
logical - 4algorithmstep by step procedure to do a specific task
- 5rom vs ramrom: read only memory, stays after we turn off the power
ram: random access memory, lost after we turn off the power - 6integral types vs floating pointint char vs. float double
- 7value rangesThe number of bytes allocated for a type determines the range of values that that type can store.
- 8alu vs fpaparts of the cpu that process operands
alu: processes integral-operands
fpa: processes floating-point operands - 9function of printfsends a string to the output
- 10function of scanftakes data from user, inputs it into a variable
- 11format specifiers%c --> character
%d --> decimal
%f --> floating-point
%lf --> floating-point(double)
%s --> string - 12'=' (synonym)assignment operator
- 13binary operations vs. unary operations vs. comparison operator-;+;/
vs
+ --> evaluates operand
- -->changes sign of operator
vs
== ; &&; || - 14sequencial constructsstatements follow other statements in a specific order
- 15structured programmingsimple set of constructs where each have an entry and exit point
- 16iteration constructsrepitition of the same code until a certain condition has been met
- 17pseudocoding vs flowchartingWriting a set of instructions in english to create a prototype of what your program will do before writing the actual program
vs
symbols and arrows that represent the flow of control in ur program - 183 things software must bereadable, easy to upgrade, easy to maintain
- 19compound condition binary contruct multiple selection case-by-case-multiple selection = compound condition(if, else if, else)
-binary construct = if, else
-case-by-case = switch(condition)
case:1
case:2
default: - 20conditional expressioncondition ? operand : operand
-stored in a variable - 213 types of iteration constructs-while
-do while
-for - 22flagsvariables that stop loops when they are changed to a specific value
- 23nested constructs vs nested selectionone logic construct within another
vs
selecting which construct to pick through if statements that satisfy certain conditions - 24selection constructs (3)-optional path
-alternative path
-conditional expression - 25make sure to review style guidelines and testing/debuggingdumbass
- 26arrayData structure consisting of an ordered set of elements of common type stored contiguously in memory
- 27how to initialize an arraytype identifier[size];
or
type identifier[size] = {value,...,value}; - 28what is a string fuckoffchar array w/ 1 extra element: /0(terminator)
xd - 29primitive vs derived typesint,float,char,double
vs
collection of other types within a structure - 30how to write a declaration//student.h
-struct student {
int no;
float grade[4];
}; - 31how to allocate memory for a structstruct tag identifier;
- 32procedural programming/modular designseparation of source code into self-contained components that can be assessed multiple times from diff locations in a complete program
- 33modulesset of logical constructs that are related to each other
- 343 guidelines for creating a function-easy to upgrade
-contains readable amount of code
-may be used as part of the solution to some problem - 35For structured design...(3 things)-each module has one entry point and one exit point
-each module exhibits low coupling (relationship between other modules)
-each module is highly cohesive (focuses on one task) - 36function def (consists)Consists of a header and a body. The body contains the instructions preformed by the function. The header precedes the body and includes 3 things.
- 373 things that the header includes-the type of return value
-the function's identifier
-a parentheses-enclosed list of parameters(recieved by the caller) - 38no parameter functionif a function returns nothing, it is of type int
&&
if there are no parameters, put 'void' in the parentheses - 39what is the function of main-loads the program into ram to be accessed by the OS
-returns an int value when completed operation(0 if successful) - 40Pass by pass valueEnsures that the arguments are not changed in the call statement. When a module is called, the C language dedicates memory to said call statements and stores them contiguously as initial values.
- 41addressthe & operator next to a variables identifier evaluates to the adress of that variable in memory
- 42pointervariable that holds the address and stores it in memory
- 43NULLDefined constant that contains a null value
Information
- Description
- Flashcards on ipc mid, created by hasdfhfsd gsdhhgsdh on 16/10/2018.
- Created by
- hasdfhfsd gsdhhgsdh
- Views
- 0
- Rating