Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4. Consider the following declaration int alpha[3];. Which of the following inpu

ID: 3558044 • Letter: 4

Question

4. Consider the following declaration int alpha[3];. Which of the following input statements correctly inputs values into alpha?

cin>>alpha
>>alpha
>>alpha;

cin>>alpha[0]
>>alpha[1]
>>alpha[2];

cin>>alpha[1]
>>alpha[2]
>>alpha[3];

cin>>alpha



5. Which of the following correctly declares name to be a character array and stores "William" in it?
Question options:

char name[6] = "William";

char name[7] = "William";

char name[8] = "William";

char name[8] =

Explanation / Answer

4) cin>>alpha[0]
>>alpha[1]
>>alpha[2];

5) char name[8] = "William";

since william is 7 letetr and one letter for /0

6) beta[0] => first element

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote