#Meta-Wlp: #Macro: TITLE wlp: Learn C (IV) p. 2 #Eval: $TITLE$ #Macro: PAGE bb4-2

It prints: SHOUT!

A function definition is given by,
type name ( arguments ) compound-statement

#include<stdio.h>

/* a function called make_me_upper, called by main */
int make_me_upper( char * s ) {
   int delta ;
   delta = 'a' - 'A' ;
   while (*s) {
      *s -= delta ;
      s++ ;
   }
}

int main(){
  char * t ;
  t = "shout" ;
  make_me_upper(t) ;    /* the function call */
  printf ("%s!\n",t) ;
}
Why did the s++ in make_me_upper not change the value of t in main? #Shuffle: none $PAGE$-A $PAGE$-B $PAGE$-C Return to Learn C Table of Contents #: Because s and t are different names. #: Because C always uses call-by-value. #: It does change the value of t in main! t now points to the string SHOUT. #: