Shared Flashcard Set

Details

Chapter 11
Chapter 11 vocabulary flash cards
28
Computer Science
Undergraduate 1
07/29/2012

Additional Computer Science Flashcards

 


 

Cards

Term
cohesion
Definition
a measure of how closely the processes in a function are related
Term
coincidental cohesion
Definition
last level of cohesion; combines processes that are unrelated
Term
communicational cohesion
Definition
third level of cohesion; combines processes that work on the same data
Term
delimited string
Definition
string with a delimiter, commonly ASCII null character '\0' at the end
Term
delimiter
Definition
indicates a stopping point in a sequence of data, like a period
Term
scan set
Definition
[...]; conversion code used to allow any of the characters included; [^...] to do the opposite
Term
fixed-length string
Definition
character array of a set size
Term
information hiding
Definition
hiding information from modules that don't need it
Term
length-controlled string
Definition
variable length string controlled by length
Term
logical cohesion
Definition
sixth level of cohesion; combines processes related only by the entity that controls them
Term
procedural cohesion
Definition
fourth level of cohesion; combines unrelated processes that are linked by a control flow
Term
sequential cohesion
Definition
second level of cohesion; combines two or more related tasks that are closely tied together, usually with the output of one flowing as input to the other
Term
temporal cohesion
Definition
fifth level of cohesion; combines unrelated processes that always occur together
Term
char* strcpy
Definition
(char* toStr, const char* fromStr)

copies fromStr to toStr, possibly overwriting memory after toStr if it is too short; undefined if fromStr and toStr overlap

returns a pointer to toStr
Term
char* strncpy
Definition
(char* toStr, const char* fromStr, int size)

copies fromStr to toStr, but only a maximum of size characters

returns a pointer to toStr
Term
int strcmp
Definition
(const char* str1, const char* str2)

compare str1 and str2

returns 0 if equal, < 0 if str1 is less than str2, > 0 if str1 is greater than str2
Term
int strncmp
Definition
(const char* str1, const char* str2, int size)

compares str1 and str2, but only for a maximum of size characters

returns 0 if equal, < 0 if str1 is less than str2, > 0 if str1 is greater than str2
Term
char* strcat
Definition
(char* str1, const char* str2)

copies str2 to the end of str1, beginning with str1's delimiter

returns a pointer to str1
Term
char* strncat
Definition
(char* str1, const char* str2, int size)

concatenates str2 to the end of str1, but only a maximum of size characters

returns a pointer to str1
Term
char* strchr
Definition
(const char* string, int ch)

finds first occurrence of ch in string

returns pointer to first occurrence of ch
Term
char* strrchr
Definition
(const char* sting, int ch)

finds last occurrence of ch in string

returns pointer to last occurrence of ch
Term
char* strstr
Definition
(const char* string, const char* sub_string)

finds substring in string

returns pointer to first occurrence of substring in string
Term
int strspn
Definition
(const char* str, const char* set)

finds first char not in set by spanning characters that are in the set and stopping at the first one that isn't

returns number of characters that matched the set
Term
int strcspn
Definition
(const char* str, const char* set)

spans characters that are not in set, stopping at the first one that is in set

returns number of characters not in set
Term
char* strpbrk
Definition
(const char* str, const char* set)

same as strcspn; STRingPointerBReaK

returns a pointer to first character in the set, NULL if none
Term
char* strtok
Definition
(char* str, const char* delimiters)

str is parsed, changing first delimiter to '\0'; if first parameter is not a string, strtok assumes that it has already parsed part of it and starts at the end of the last token found; skips over leading delimiter characters

returns pointer to next character after delimiter, or NULL if string is done being parsed or all characters are delimiters
Term
long strtol
Definition
(char* str, char** ptr, int base)

converts str to a long, with a certain base; if base is 0, tries to figure out what base it is; address of the trailing string is stored in ptr

returns long parsed from string
Term
double strtod
Definition
(char* str, char** ptr)

str must be floating-point in decimal or scientific notation; ptr is set to character after the number

returns double parsed from string
Supporting users have an ad free experience!