1. Identifying the header lines / prototypes of the following functions: a. A fu
ID: 3531117 • Letter: 1
Question
1. Identifying the header lines / prototypes of the following functions: a. A function called lastChars which uses a string as input and returns the last two characters in the string. b. A function called isSquare that responds to its caller the result of a test: the test is whether or not an integer is a perfect square. (For example, 16 is a perfect square, but 5 is not.) c. A function called sumDigits which returns the sum of the digits of an integer. d. A function called isSmall that returns an answer of true if a double precision parameter has a value between 0 and 0.001. (It returns false otherwise.) e. A function called randomColor. The function generates a random number and based on that number chooses a color. The color is returned.Explanation / Answer
a)
char * lastChars(char str[]);
b)
booleanisSquare(int number);
c)
intsumDigits(int num);
d)
booleanisSmall(double number);
e)
color randomColor();
// use an enum for this called color
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.