Which of the following about arrays as parameters is true? (i) Arrays are passed by reference only. (ii) When we declare an array as a formal parameter we do not attach & after the data type of the array component.
Suppose alpha is an array of 50 components. Which of the following about alpha is true? (i) The base address of alpha is the address of alpha[0]. (ii) The base address of alpha is the address of alpha[1].
Suppose that the array alpha is to be declared as a formal parameter in a function heading.Which of the following about alpha is true? (i) You must specify the size of alpha in square brackets. (ii) You cannot pass alpha by value.
Which of the following correctly declares name to be a character array and stores "William" in it? (i) char name[8] = "William"; (ii) char name[7] = "William";
Consider the following declaration: char str[15]; int j; Which of the following statements stores "Blue Sky" into str? (i) str = "Blue Sky"; (ii) str[15] = "Blue Sky"; (iii) strcpy(str, "Blue Sky");
Consider the following declaration: char name[16]; int j; and the input is Samantha Which of the following statements stores "Samantha" into str? (i) cin>>name; (ii) for(j = 0; j < 8; j++) cin>>name[j]; name[8] = '\0';