/* Elvis.c (c) Kari Laitinen http://www.naturalprogramming.com/ 2013-11-25 File created. 2013-11-25 Last modification. Unlike strings in some other programming languages, C-style strings can be freely modified. In this program four characters of a string are overwritten with other characters. */ #include int main() { char character_positions[] = "0123456789012345678901" ; char elvis_sentence[] = "Elvis was a rock star." ; printf( "\n %s", character_positions ) ; printf( "\n\n %s", elvis_sentence ) ; elvis_sentence[ 12 ] = 'm' ; elvis_sentence[ 14 ] = 'v' ; elvis_sentence[ 15 ] = 'i' ; elvis_sentence[ 16 ] = 'e' ; printf( "\n\n %s\n", elvis_sentence ) ; } /* The output of this program is the following: 0123456789012345678901 Elvis was a rock star. Elvis was a moviestar. */