top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

Arrays can be initialized provided they are

+2 votes

Arrays can be initialized provided they are
(1) Automatic
(2) External
(3) Static
(4) Both (2) and (3)

posted Nov 4, 2014 by Amit Kumar Pal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

External is not initialization its just telling the compiler then variable is not available in this file but is available in the other file of the same project and will be available at the time of linking. So this is not a initialization at all.

Now we are left with two Automatic and static both can be explicitly initialized and if not initialized explicitly then static element are initialized with zero while auto will have junk value.

Now coming to the answer, option 1 & 3 are correct.

answer Nov 4, 2014 by Salil Agrawal
Similar Questions
+3 votes

[1 7 15 29 11 9]

[9 15] [1 7 11 29]

Average of first part: (15+9)/2 = 12,
Average of second part: (1 + 7 + 11 + 29) / 4 = 12

+3 votes

Hamming distance between two binary numbers is the number of different bits between two numbers. With respect to 0, how many numbers are there with 10 as the hamming distance and can be represented using 15 bits.

+3 votes

Given an active stream of sorted arrays, how would you merge them efficiently?
C or Java code would be helpful?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.