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 |
Option: A Explanation :
Consider the following declaration 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.
|
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 |
Option: C Explanation :
One element takes three memory words so memory location 1120 , 1121 , 1123 stores first element. 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 )
|
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 |
Option: C Explanation :
Only element 70 violates the rule. Hence, it must be shifted to its proper position. 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
|
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; |
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.
|
Syllabus Covered in this section is
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 -
Various Search Terms used for this section are