1.

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);Origin of the question is Array and Array Operations in chapter Abstract Data Types of Data Structures & Algorithms IThe question was posed to me by my college director while I was bunking the class.

Answer» RIGHT answer is (C) int arr[3] = {1,2,3};

EXPLANATION: This is the SYNTAX to initialize an ARRAY in C.


Discussion

No Comment Found

Related InterviewSolutions