Question: Both 12 and 13 please A string array is defined as: char *planets[] = {Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto); What's the
A string array is defined as: char *planets[] = {"Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"); What's the value of planets [2] [2]? a) "Venus" b) "Jupiter" c) "Earth" d) 'r' e) 'a' Which one of the following implementation of the swap() function would exchange the variables of the variables successfully? When passed the addresses of two variables i and j, swap (&i, &j); will exchange values of i and j. a) void swap (int *p, int q) {int tmp; *p = *q; *q = temp; b) void swap (int *p, int *q) {int *tmp; tmp = p; p = q; q = tmp;} c) void swap (int *p, int *q) {int *tmp; tmp = p; q = p; p = tmp;} d) void swap (int *p, int *q) {int tmp; tmp = *p; *q = *p; *p = tmp;}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
