How can you sort the elements of the array in descending order?

1 Answer

Answer :

By calling Sort() and then Reverse() methods. 

Related questions

Description : How can you sort the elements of the array in descending order? 

Last Answer : By calling Sort() and then Reverse() methods.

Description : Write a program to sort elements of an array in ascending order.

Last Answer : #include #include void main() { int a[5],i,j,temp; clrscr(); printf("\n Enter array elements:"); for(i=0;i

Description : Can you store multiple data types in System.Array?

Last Answer : No. 

Description : What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?

Last Answer : The first one performs a deep copy of the array, the second one is shallow. 

Description : Can you store multiple data types in System.Array?

Last Answer : No.

Description : Write some code to implement a jagged array. 

Last Answer : // Declare the array of two elements: int[][] myArray = new int[2][]; // Initialize the elements: myArray[0] = new int[5] {1,3,5,7,9}; myArray[1] = new int[4] {2,4,6,8};

Description : Write some code to implement a multidimensional array.

Last Answer : int[,] b = {{0, 1}, {2, 3}, {4, 5}, {6, 7}, {8, 9}}; 

Description : Does the size of an array need to be defined at compile time.

Last Answer : No

Description : Can you resize an array at runtime?

Last Answer : No

Description : What is array rank? 

Last Answer : The dimension of the array. 

Description : What is the default index of an array? 

Last Answer : 0

Description : Write some code that declares an array on ints, assigns the values: 0,1,2,5,7,8,11 to that array and use a foreach to do something with those values.

Last Answer : int x = 0, y = 0; int[] arr = new int [] {0,1,2}; foreach (int i in arr) { if (i%2 == 0) x++; else y++; }

Description : What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?

Last Answer : The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a ... create a new instance of each element's object, resulting in a different, yet identacle object.

Description : Can you store multiple data types in System.Array?

Last Answer : No.

Description : Define what is the difference between Array and LinkedList?

Last Answer : The array is a simple sequence of numbers which are not concerned about each other’s positions. they are independent of each other’s positions. adding, removing or modifying any array element is very easy. Compared to arrays, a linked list is a complicated sequence of numbers.

Description : Define what is the difference between Array and ArrayList?

Last Answer : An array is a collection of the same type. The size of the array is fixed in its declaration. A linked list is similar to an array but it doesn’t have a limited size.

Description : List out the differences between Array and ArrayList in C#?

Last Answer : Array stores the values or elements of the same data type but ArrayList stores values of different data types. Arrays will use the fixed length but ArrayList does not use fixed length like an array.

Description : Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].

Last Answer : quicksort ((data + 222), 100)

Description : Describe how to use a DataView to filter or sort data.

Last Answer : You can apply sort criteria to a DataView by setting the Sort property to the name of a column or columns to be sorted by. The data represented in a DataView object can be filtered by setting the RowFilter property to a valid filter expression.

Description : Write a program to sort an 1-d array in ascending order.

Last Answer : #include<iostream.h> #include<conio.h> void main() { int arr[20]; int i, j, temp,n; clrscr(); cout<<"\n Enter the array size:"; cin>>n; cout<<"\n Enter ... 0;i<n;i++) {  cout<< \n <<arr[i]; } getch(); }

Description : In which of the following groups, are the elements written in the descending order of their respective atomic weights? (a) Nitrogen, carbon, oxygen, hydrogen (b) Oxygen, argon, nitrogen, hydrogen (c) Oxygen, nitrogen, helium, hydrogen (d) Oxygen, nitrogen, helium, bromine

Last Answer : Ans:(c)

Description : Explain how to use the HelpProvider component to provide help for UI elements.

Last Answer : You can provide either a HelpString or a help topic for UI elements with the HelpProvider. The HelpProvider provides HelpString, HelpKeyWord, and HelpNavigator properties for each control on the form. If ... particular element is displayed when the element has the focus and the F1 key is pressed.

Description : Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

Last Answer : Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in O(n log n) time.

Description : If the given input array is sorted or nearly sorted, which of the following algorithm gives the best performance? a) Insertion sort b) Selection sort c) Quick sort d) Merge sort

Last Answer : a) Insertion sort

Description : In order to get maximum radiation to all surrounding points in the horizontal plane, the antenna used is a A. vertical loop B. vertical quarter-wavelength rod C. array which includes parasitic elements D. a horizontal Hertz dipole

Last Answer : B. vertical quarter-wavelength rod

Description : Describe two ways to set the tab order of controls on your form.

Last Answer : You can set the tab order in Visual Studio by choosing Tab Index from the View menu and clicking each control in the order you desire. Alternatively, you can set the TabIndex property either in code or in the Properties window.

Description : What does operator order of precedence mean? 

Last Answer : Certain operators are evaluated before others. Brackets help to avoid confusion. 

Description : Arrange in descending order of magnitude : -Maths 9th

Last Answer : The given surds are of order 3,6 and 9 respectively . The L.C.M. of 3,6 and 9 is 18 . Reducing each surd to a surd of order 18.

Description : Arrange in descending order of magnitude : -Maths 9th

Last Answer : The given surds are of order 3,6 and 9 respectively . The L.C.M. of 3,6 and 9 is 18 . Reducing each surd to a surd of order 18.

Description : In triangle ABC, angle B =35° , angle C =65° and the bisector of angle BAC meets BC in X. Arrange AX, BX and CX in descending order. -Maths 9th

Last Answer : NEED ANSWER

Description : In triangle ABC, angle B =35° , angle C =65° and the bisector of angle BAC meets BC in X. Arrange AX, BX and CX in descending order. -Maths 9th

Last Answer : This answer was deleted by our moderators...

Description : Select the correct order of osmolarity changes in fillrate w.r.t. plasma in `:-` Bowmans capsul `rarr` PCT `rarr` Descending loop of henle `rarr `Asce

Last Answer : Select the correct order of osmolarity changes in fillrate w.r.t. plasma in `:-` Bowmans ... `rarr` Isotonic `rarr` Hypotonic `rarr` Hypertonic

Description : Which of the followin ratios are in descending order?

Last Answer : Which of the followin ratios are in descending order? A. `9:13,7:9,8:11,11:14` B. `11:14,8:11,7:9,9:13` C. ... :9,8:11,9:13` D. `9:13,8:11,7:9,11:14`

Description : Which one of the following gives the two largest Union Territories of India (in terms of geographical area) in the correct descending order? (a) Andaman and Nicobar Islands and Delhi (b) Chandigarh, Lakshadweep (c) Delhi, Puducherry (d) Delhi, Chandigarh

Last Answer : Ans: (a)

Description : What is the correct sequence of the riven Godavari, Mahanadi, Narmada and Tapi in the descending order of their lengths? (a) Godavari – Mahanadi – Narmada – Tapi (b) Godavari – Narmada – Mahanadi – Tapi (c) Narmada – Godavari – Tapi – Mahanadi (d) Narmada – Tapi – Godavari – Mahanadi

Last Answer : Ans: (b)

Description : Which one of the following lives the three largest states of India (in terms of geographical area) in the correct descending order? (a) Rajasthan, Madhya Pradesh, Maharashtra (b) Uttar Pradesh, ... Pradesh (c) Madhya Pradesh, Maharashtra, Andhra Pradesh (d) Madhya Pradesh, Uttar Pradesh, Rajasthan

Last Answer : Ans: (a)

Description : What is the correct sequence of hill stations according to height above mean sea level in descending order? (a) Kodaikanal, Darjeeling, Shimla and Mahabaleshwar (b) Shimla, Darjeeling, ... (c) Kodaikanal, Shimla, Mahabaleshwar and Darjeeling (d) Mahabaleshwar, Shimla, Darjeeling and Kodaikanal

Last Answer : Ans: (b)

Description : Consider the following areas: 2. Himalayas 3. Chhotta Nagpur 4. Chhattisgarh 5. Son Valley What is the correct sequence of these areas in descending order of their coal reserves? [NDA 2003] (a) 1, 4, 3, 2 (b) 2, 4, 3, 1 (c) 1, 3, 4, 2 (d) 2, 3, 4, 1

Last Answer : Ans: (d)

Description : Ans: (5) 41. Which one among the following is a correct sequence of production of coal in the Indian States in descending order ? [NDA 2011] (a) Jharkhand - Madhya Pradesh - West Bengal ... - West Bengal - Meghalaya - Madhya Pradesh (d) Madhya Pradesh - Jharkhand - West Bengal - Meghalaya

Last Answer : Ans: (a)

Description : The following are the major oilseeds produced in India: [IAS 1997] 1. Sesamum 2. Mustard 3. Groundnut 4. Soyabean Which one of the following is the correct sequence of the descending order of the quantity of their production? (a) 1, 2, 3, 4 (b) 3, 2, 4, 1 (c) 2, 4, 3, 1 (d) 3, 4, 2, 1

Last Answer : Ans: (b)

Description : Which one of the following shows the correct sequence of places in descending order of the average summer rainfall ? [CDS 1993] (a) Jaisalmer, Pune, Allahabad, Cherapunji (b) Cherapunji, Jaisalmer, Pune, Allahabad (c) Allahabad, Pune, Jaisalmer, Cherapunji (d) Cherapunji, Allahabad, Pune, Jaisalmer

Last Answer : Ans: (d)

Description : Put in descending order of area with the following soils in India: 1. Red soils 2. Black soils 3. Laterite soils 4. Alluvial soils (a) I, IV, II, III (b) IV, II, I, III (c) IV, I, III, II (d) I, III, IV, II

Last Answer : Ans: (a)

Description : Arrange the following rivers in descending order of their length: 1. Ravi 2. Cauvery 3. Sutlej 4. Yamuna (a) 1, 2, 4, 3 (b) 3, 4, 1, 2 (c) 4, 3, 2, 1 (d) 1, 2, 3, 4

Last Answer : Ans: (c)

Description : What is the correct sequence of the rivers- Godavari, Mahanadi, Narmada and Tapi in the descending order of their lengths? [IAS 2003] (a) Godavari - Mahanadi - Narrnada - Tapi (b) Godavari - Narmada - Mahanadi - Tapi (c) Narmada - Godavart - Tapi - Mahanadi (d) Narmada- Tapi - Godavari – Mahanadi

Last Answer : Ans: (b)

Description : Which one the following is a correct sequence of rivers in terms of their total basin area, in the descending order? [IAS 2003] (a) Ganga, Indus, Brahmaputra, Godavari (b) Indus, Ganga, Brahmaputra, Godavari (c) Brahmaputra, Indus, Ganga, Godavari (d) Indus, Ganga Godavari, Brahmaputra

Last Answer : Ans: (c)

Description : Which of the following gives the correct descending order by length of the rivers of India? (a) Brahmaputra, Ganga, Godavari, Kosi (b) Ganga, Brahmaputra, Krishna, Godavari (c) Ganga, Godavari, Krishna, Yamuna (d) Ganga, Yamuna, Godavari, Mahanadi

Last Answer : Ans: (c)

Description : The correct sequence of the different sections of the Himalayas in terms of their stretch (in kilometre) in the descending order is : [IAS 2003] (a) Punjab Him., Kumaon Him., Nepal Him., Assam Him. (b) Nepal ... Nepal Him., Assam Him., Punjab Him. (d) Nepal Him., Assam Him., Kumaon Him., Punjab Him.

Last Answer : Ans: (b)

Description : The correct sequence of countries on basis of fish catch in descending order: (1) China, Japan, Peru (2) Japan, China, Peru, (3) China, Peru, Japan (4) Peru, China, Japan

Last Answer : (3) China, Peru, Japan Explanation: According to The State of World Fisheries and Aquaculture' 2014 of Food and Agriculture Organization, China is the largest fish producing country in the world. ... fish in 2012. Indonesia, USA, Peru, Russian Federation and Japan come next in sequential order.

Description : When operating under a single-period capital-rationing constraint, you may first want to try selecting projects by descending order of their in order to give yourself the best chance to select the mix of ... net present value (NPV) C. internal rate of return (IRR) D. payback period (PBP)

Last Answer : B. net present value (NPV)