adplus-dvertising
frame-decoration

Question

How do you initialize an array in C?

a.

int arr[3] = (1,2,3);

b.

int arr(3) = {1,2,3};

c.

int arr[3] = {1,2,3};

d.

int arr(3) = (1,2,3);

Answer: (c).int arr[3] = {1,2,3};

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. How do you initialize an array in C?

Similar Questions

Discover Related MCQs

Q. How do you instantiate an array in Java?

Q. Which of the following is a correct way to declare a multidimensional array in Java?

Q. When does the ArrayIndexOutOfBoundsException occur?

Q. Which of the following concepts make extensive use of arrays?

Q. What are the advantages of arrays?

Q. What are the disadvantages of arrays?

Q. What is a bit array?

Q. Which of the following bitwise operations will you use to set a particular bit to 1?

Q. Which of the following bitwise operations will you use to set a particular bit to 0?

Q. Which of the following bitwise operations will you use to toggle a particular bit?

Q. Which of the following is an advantage of bit array?

Q. Identify the disadvantages of bit array.

Q. What are some of the applications of bit arrays?

Q. Which class in Java can be used to represent bit array?

Q. What is a dynamic array?

Q. What is meant by physical size in a dynamic array?

Q. The number of items used by the dynamic array contents is its __________

Q. How will you implement dynamic arrays in Java?

Q. Which of the following is the correct syntax to declare an ArrayList in Java?

Q. In what type of dynamic array do you divide the array into two parts?