adplus-dvertising
frame-decoration

Question

Which of the following statements declares a one-dimensional Character array named item that consists of five elements?

a.

char item[0 to 4] = "";

b.

char item[0 to 5] = "";

c.

char item[4] = "";

d.

char item[5] = "";

Answer: (d).char item[5] = "";

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following statements declares a one-dimensional Character array named item that consists of five elements?

Similar Questions

Discover Related MCQs

Q. Assume that a program creates and initializes a Short Integer variable named age and a pointer named agePtr, to which it assigns the address of the age variable. Which of the following statements will assign the number 21 to the age variable?

Q. The statement fwrite ( (char*)&objl, sizeof(objl) );

Q. Which of the following statement is correct?

Q. Which of the following statements is correct?
1. Once a reference variable has been defined to refer to a particular variable it can refer to any other variable.
2. A reference is not a constant pointer.

Q. Functions can be declared to return a reference type. There are reasons to make such a declaration/Which of the following reasons are correct?
1. The information being returned is a large enough object that returning a reference is more efficient than returning a copy.
2. The type of the function must be a R-value.

Q. Which of the following statements is correct?
1. Change a reference changes the referent.
2. We can create an array of references.

Q. Which of the following statement is correct about the references?

Q. A reference is declared using the _____ symbol.

Q. Which of the following statement is correct?

Q. Which of the following statements is correct?
1. A reference is not a constant pointer.
2. A referenced is automatically de-referenced.

Q. Which of the following statements is correct?
1. An array of references is acceptable.
2. We can also create a reference to a reference.

Q. Which of the following statement is correct?

Q. Which of the following statements is correct?
1. Once the variable and the reference are linked they are tied together.
2. Once the reference of a variable is declared another reference of that variable is not allowed.

Q. Which of the following statements is correct?
1. We can return a global variable by reference.
2. We cannot return a local variable by reference.

Q. Reference is like a _____.

Q. Which of the following statement is correct?

Q. Which of the following statement is correct?

Q. Which of the following statement is correct?

Q. Which of the following statements is correct?
1. Pointer to a reference and reference to a pointer both are valid.
2. When we use reference, we are actually referring to a referent.

Q. Referring an element outside the array bounds is a