Question: Assume 1 byte char, and 8 byte pointer variables. Consider the following program: 0 1 #include 0 2 0 3 void toUpperCase ( char *

Assume 1 byte char, and 8 byte pointer variables. Consider the following program:
01 #include
02
03 void toUpperCase(char *buffer){
04
05 while (*buffer !='\0'){
06 if ('a'<=*buffer && *buffer <='z'){
07*buffer -=32;
08}
09 buffer++;
10}
11}
12
13 int main(){
14 char word[]= "hello 2401 midterm";
15 toUpperCase(word);
16 printf("%s
", word);
17}
How many bytes are written to char *buffer on line 3 when the function on line 15 is called?
1
18
0
19
8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!