QUESTION 5
Consider the following declaration:
char codes[] = {'s', 'a', 'm', 'p', 'l', 'e'};
Which of the following array declarations is equivalent to the above declaration?
1. char codes[] = "sample";
2. char codes[5] = {'s', 'a', 'm', 'p', 'l', 'e'};
3. char codes[6] = {'s', 'a', 'm', 'p', 'l', 'e'};
4. char codes[7] = {'s', 'a', 'm', 'p', 'l', 'e'};
QUESTION 6
Which of the following function header lines is valid for a function called findMax that finds and returns the maximum
value stored in an array of integers that is passed in as a parameter?
1. int findMax(int [])
2. int findMax(int)
3. int findMax(int values[])
4. int findMax([])
Question 5
2
Question 6
3
Comments
Leave a comment