Question
Asked by:
jvorheze
jvorheze from Hard Knocks
Rating : No Rating
Questions Asked: 31
Tutorials Posted: 0
 

$1.00 programming in c help asap please

Q:


What is displayed by the code fragment below if the memory for next immediately follows the memory for word?

char word[12], next[4] =
word[0] = 'c';
word[1] = 'a';
word[2] = 't';
printf(, word);

a. a line with just the word
b. a line with the word cat followed by nine blanks
c. the word cat followed by whatever garbage is in word[3] through word[11] followed by Joe (unless there is a null character somewhere in word[3] through word[11])
d. an error message
e. the word , the word , and the word again
 
Want to take a stab at the bounty and post a tutorial? Need clarification? Join us now or log in! Read more on how this works.
 
Available Tutorials to this Question
Posted by:
psquared
psquared from Oakland University
Rating (3): A+
Questions Asked: 0
Tutorials Posted: 9, earned $23.22
 

$1.00 Answer

  • This tutorial hasn't been purchased yet.
  • Posted on Dec 07, 2008 at 01:30:23PM
A:
Preview: ... ointer given (in this case 'word') until it reaches a null character. Since you assigned characters 'c' 'a' and 't' one at a ...

The full tutorial is about 112 words long .
   
Join Now or Log In
Get Tutoring
Get Paid
Academic Honesty