Java Array Board Questions


  1. Write a program to input 15 integer elements in an array and sort them in ascending order using the bubble sort technique. [15 MARKS] [2019]
  2. coming soon

  3. Write a program to accept name and total marks of N number of students in two single subscript array name[] and totalmarks[ ]. [15 MARKS] [2018]
    Calculate and print:

    (i) The average of the total marks obtained by N Number of students.
    [average = (sum of total marks of all the students)/N]

    (ii) Deviation of each student’s total marks with the average.
    [deviation = total marks of a student – average]
  4. coming soon

  5. Write a program to input integer elements into an array of size 20 and perform the following operations: [15 MARKS] [2017]
    (i) Display largest number from the array.
    (ii) Display smallest number from the array.
    (iii) Display sum of all the elements of the array.
  6. coming soon

  7. Write a program to initialize the seven Wonders of the World along with their locations in two different arrays. Search for a name of the country input by the user. If found, display the name of the country along with its Wonder, otherwise display “Sorry Not Found!”. [15 MARKS] [2016]
    
    Seven wonders — CHICHEN ITZA, CHRIST THE REDEEMER, 
    TAJMAHAL, GREAT WALL OF CHINA, 
    MACHU PICCHU, PETRA, COLOSSEUM
    
    Locations — MEXICO, BRAZIL, 
    INDIA, CHINA, PERU,
    JORDAN, ITALY
    
    Example :
    
    Country Name: INDIA   
    
    Output: INDIA-TAJ MAHAL
    
  8. coming soon

  9. Write a program to input twenty names in an array. Arrange these names in descending order of alphabets, using the bubble sort technique. [15 MARKS] [2015]
  10. coming soon

  11. Write a program to accept the year of graduation from school as an integer value from the user. Using the Binary Search technique on the sorted array of integers given below.
    Output the message “Record exists” If the value input is located in the array. If not, output the message “Record does not exist”.
    {1982, 1987, 1993, 1996. 1999, 2003, 2006, 2007, 2009, 20101} [15 MARKS] [2014]
  12. coming soon

  13. Write a program to input 10 integer elements in an array and sort them in descending order using the bubble sort technique. [15 MARKS] [2013]
  14. coming soon

  15. Write a program to accept the names of 10 cities in a single dimension string array and their STD (Subscribers Trunk Dialing) codes in another single dimension integer array. Search for a name of a city input by the user in the list. If found, display “Search Successful” and print the name of the city along with its STD code, or else display the message “Search Unsuccessful, No such city in the list”. [15 MARKS] [2012]
  16. coming soon

  17. Write a program to input and sort the weight of ten people. Sort and display them in descending order using the selection sort technique. [15 MARKS] [2011]
  18. coming soon

  19. Write a program to initialize the given data in an array and find the minimum and maximum values along with the sum of the given elements. [15 MARKS][2007]
    
    Input :
    Numbers : 2 5 4 1 3
    
    Output :
    Minimum value : 1
    Maximum value: 5
    Sum of the elements : 1
    
  20. coming soon