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
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.