Ask Question
4 April, 07:38

Assume that array1 and array2 are both 25-element integer arrays. Indeicate whether each of the following statements is legal or illegal. a. array1 = array2; b. cout<>array2;

+5
Answers (1)
  1. 4 April, 07:50
    0
    a. array1 = array2; Illegal

    b. cout<< array1; Illegal

    c. cin >>array2; Illegal

    Explanation:

    a. array1 = array2;

    Illegal, since the assignment operator doesn't work to directly assign the values into other array.

    b. cout<< array1;

    Illegal, since the index number in not defined, if you want to print all the elements in the array1 then run a for loop to iterate over the entire loop.

    c. cin >>array2;

    Illegal, since the index number is not defined, if you want get input from the user then run a for loop to iterate over the entire loop.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Assume that array1 and array2 are both 25-element integer arrays. Indeicate whether each of the following statements is legal or illegal. ...” in 📗 Engineering if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers