4. Given the following piece of C code char String [18] = Computing Science; int i...
Fantastic news! We've Found the answer you've been seeking!
Question:
4. Given the following piece of C code char String [18] = "Computing Science"; int i =0, lenstr = strlen(String), counter=0; while(i<lenstr) switch (String[i]) ( case 'a': case 'o': case 'u': case 'i': case 'e': counter++; break; default: break; } i++; (a) What does will be the value in counter after the execution of the piece of code above? (b) In general, what does the this piece of code do given a value String? 4. Given the following piece of C code char String [18] = "Computing Science"; int i =0, lenstr = strlen(String), counter=0; while(i<lenstr) switch (String[i]) ( case 'a': case 'o': case 'u': case 'i': case 'e': counter++; break; default: break; } i++; (a) What does will be the value in counter after the execution of the piece of code above? (b) In general, what does the this piece of code do given a value String?
Related Book For
Posted Date: