CS 1325 Lecture 14:
Document Summary
- write a function to count the number of times a char appears on a c string. Non case sensitive(i. e. a, and a are the same. ) - assume the c-string is always valid and. - the char is always a symbol "a" to "z" or "a" to "z" int countchar(char*, char); - given a valid c-string representing a binary number, determine the max value and min value in decimal i. e. 01110 => max value 11100 and min value 00111. //the function prints max and min in decimal void printmaxandmin(char *); - the * is telling us that pointer_name is a pointer variable. - pointer_type indicates the data type of the objects the pointer can point to. - when a function receives an argument by reference, the changes made to the object within the function, will affect the object even outside the function.