Welcome Guest | Sign in | Register
Arrays - Discussion Page For Q.10451 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Arrays > Questions and Answers

Q: Write for loop which will read five characters (use scanf) and deposit them into the character based array words, beginning at element 0.
A. Statement 1
for( loop = 0; loop < 5; loop++ )
scanf("%c", &words[loop] );
B. Statement 2
for( loop = 0; loop <= 5; loop++ )
scanf("%c", words );
C. Statement 3
for( loop = 0; loop < 5; loop++ )
scanf("%c", &words[0] );
D. Cannot be detemined

Answer and Explanation

Answer:Statement 1
for( loop = 0; loop < 5; loop++ )
scanf("%c", &words[loop] );

Explanation:
There is no explanation...

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.