# C Programming MCQ - Arrays

6:

Size of the array need not be specified, when

 A. Initialization is a part of definition B. It is a declaratrion C. It is a formal parameter D. All of these Answer Report Discuss Option: A Explanation : Consider the following declaration double balance[] = {1000.0, 2.0, 3.4, 17.0, 50.0}; If you omit the size of the array, an array  just big enough to hold the initialization is created. So, correct option is 'A'. Click on Discuss to view users comments. Naveen Kumar Chaudhary said: (8:54pm on Thursday 4th July 2013) The answer is wrong as size must be specified during declaration.The answer must be [c].If you have any clarification ,please mail me. Narendra Kumar Rout said: (11:11pm on Tuesday 31st December 2013) I think option A and C is correct Shaima Rahim said: (1:20am on Monday 18th December 2017) Option D is correct.In all 3 cases mentioned,the size of array need not be specified. Write your comments here:
7:

A one dimensional array A has indices 1....75.Each element is a string and takes up three memory words. The array is stored starting at location 1120 decimal. The starting address of A[49] is

 A. 1167 B. 1164 C. 1264 D. 1169 Answer Report Discuss Option: C Explanation : One element takes three memory words so  memory location 1120 , 1121 , 1123  stores first element. A[49] will be stored at location 1264 , (1120+(48*3)) Click on Discuss to view users comments. Artimis said: (12:07pm on Monday 1st July 2013) 1120 (48*3)=1267 how is 1264??? k.karuna said: (11:12am on Wednesday 21st June 2017) 48*3=1441120 144=1264 Adi said: (10:14pm on Friday 9th March 2018) 1120 (48*3)=1264. rachel said: (8:29pm on Wednesday 21st March 2018) address of A[i]= Base address storage size of one element -in byte*(i - lower bound of subscript ) Write your comments here:
8:

Minimum number of interchange needed to convert the array 89,19,40,14,17,12,10,2,5,7,11,6,9,70, into a heap with the maximum element at the root is

 A. 0 B. 1 C. 2 D. 3 Answer Report Discuss Option: C Explanation : Only element 70 violates the rule. Hence, it must be shifted to its proper position. Step1: swap(10, 70) Step2: swap(40, 70) Hence, only 2 interchanges are required. Click on Discuss to view users comments. Anoop Rekha said: (10:41am on Tuesday 7th May 2013) Element 70 and 40 violates the rule. Hence they must be shifted to its proper position. first swap 70 with 10 2nd swap 70 with 14then from other side swap 40 with 19. So three interchanges required. Ans should be three Mayank said: (6:09pm on Tuesday 7th May 2013) I m getting three (3) ruchi said: (8:57pm on Monday 22nd June 2015) not understandexplain with to draw the heap structure Write your comments here:
9:

Which of the following is an illegal array definition?

 A. Type COLOGNE:(LIME,PINE,MUSK,MENTHOL); var a:array[COLOGNE]of REAL; B. var a:array[REAL]of REAL; C. var a:array['A'..'Z']of REAL; D. var a:array[BOOLEAN]of REAL; Answer Report Discuss Option: B Explanation : Click on Discuss to view users comments. gayatri said: (2:16pm on Thursday 18th April 2013) not able to understand....can u please explain?? chintan said: (3:15pm on Saturday 27th April 2013) as per my perspective D is the right answer. Mayank said: (7:00pm on Tuesday 7th May 2013) only option B is array of continuous function. you can't make array of [real] of real nos. It does not have discrete elements so can't be indexed. so Given ans is right. Surendra Kr. Sharma said: (4:06pm on Tuesday 6th October 2015) Array indexes must be discrete, in option B [REAL] is continuous therefore it is illegal definition. Write your comments here:
10:   Minimun number of comparison required to compute the largest and second largest element in array is
 A. n-[log₂n]-2 B. n+[log₂n-2] C. log₂n D. None of these Answer Report Discuss Option: B Explanation : Click on Discuss to view users comments. Write your comments here:

Syllabus Covered in this section is

• Elements of C-Tokens
• Identifiers
• data types in C
• Control structures in, C
•  Sequence, selection and iteration(s).
• Structured data types in C
• Arrays, Structures, union, String, and pointers
• Functions, Recursion
• Parameter passing, Scope
•  Binding, Abstract data types

This Section covers Multiple Choice Questions Answers in C Programming . Here questions answers are given with explanation and references. These questions can be used for the preparation of various competitive and academic exams.

Who can benefit -

• Any undergraduate or postgraduate student who is seeking C Programming objective type questions answers can use this section.
• C Programming Objective type Questions Answers are also used at SSC and HSc level for Exam preparation.
• C Programming MCQ Questions Answers are also used by engineering students in the preparation of their Exams.
• Any candidate who has to appear for DOEACC A, B or C level Exam can also learn C Programming Questions Answers.
• All the teachers who are appearing for Kendriya Vidyalya Sangathan Entrance Exam can also use C Programming Multiple Choice Questions Answers.
• C Programming MCQs can also be used by the students who are pursuing B.Sc or Msc Computer Science.
• C Programming Questions Answers can also be used by BCA students for the preparation of their exams.
• Any student who is pursuing B.Sc. in Information Technology can also use this C Programming mcq Questions Answers.
•  MCA students can also prepare for their exams using  C Programming Objective Type Questions Answers.

Various Search Terms used for this section are