Question: On paper, trace the program segment below 1. determine how many characters are printed on the screen. char b; for (b = 'G'; b =

On paper, trace the program segment below 1. determine how many characters are printed on the screen.

char b; for (b = 'G'; b <= 'Z'; b++) printf ("%c ", b);

2. give the screen output.

int i, j; for (i = 2; i <= 4; i++) for (j = 5 ; j >= 3; j--)  printf ("%d ", i + j); 

3.

a. Describe what the program does in at most 20 words. b. In the main() function, what values are being assigned to the variables x and y?

c. In the doThis() function, what value must be entered to exit (or stop) the loop?

void doThis (int* s) { do{ scanf ("%d", s); }while (*s >= 0); } int main () { int x, y, s;  scanf("%d", &s); x = s; y = s; if (s >= 0)  doThis (&s);  if (s < 0) printf("%d%d", x, y);  else printf("none ");  return 0; } 

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!