All India Exams
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

Arrays Questions And Answers

Here you can find Arrays Questions and Answers.

Why Arrays Questions and Answers Required?

In this Arrays Questions and Answers section you can learn and practice Arrays Questions and Answers to improve your skills in order to face technical inerview conducted by organisations. By Practicing these interview questions, you can easily crack any Exams interview.

Where can I get Arrays Questions and Answers?

AllIndiaExams provides you lots Arrays Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Arrays Questions and Answers as PDF files and eBooks.

How to solve these Arrays Questions and Answers?

You no need to worry, we have given lots of Arrays Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Competitive Exams interview.

Arrays Questions and Answers

1. Which of these operators is used to allocate memory to array variable in Java?

Arrays Questions and Answers

2. Which of these is an incorrect array declaration?

Arrays Questions and Answers

3. What will this code print? int arr[] = new int [5]; System.out.print(arr);

Arrays Questions and Answers

4. Which of these is an incorrect Statement?

Arrays Questions and Answers

5. Which of these is necessary to specify at time of array initialization?

Home EngineeringComputer Science & EngineeringJava Questions and AnswersArrays

Arrays - Java Multiple Choice Questions and Answers

This is the java programming questions and answers section on "Java Arrays" with an explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand.

Java Arrays Questions - Quiz Details

Online Test Name Java Arrays
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
Number of Questions 05
1. Which of these operators is used to allocate memory to array variable in Java?
  • A. malloc
  • B. alloc
  • C. new
  • D. new malloc
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

Operator new allocates block of memory specified by the size of array, and gives the reference of memory allocated to the array variable.

Workspace

Report Error


2. Which of these is an incorrect array declaration?
  • A. int arr[] = new int[5]
  • B. int [] arr = new int[5]
  • C. int arr[]
    arr = new int[5]
  • D. int arr[] = int [5] new
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

Operator new must be succeeded by array type and array size.

Workspace

Report Error


3.

What will this code print?

 int arr[] = new int [5];

 System.out.print(arr);

  • A. 0
  • B. value stored in arr[0].
  • C. 00000
  • D. Garbage value
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option D

Explanation:

arr is an array variable, it is pointing to array if integers. Printing arr will print garbage value. It is not same as printing arr[0].

Workspace

Report Error


4. Which of these is an incorrect Statement?
  • A. It is necessary to use new operator to initialize an array.
  • B. Array can be initialized using comma separated expressions surrounded by curly braces.
  • C. Array can be initialized when they are declared.
  • D. None of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

Array can be initialized using both new and comma separated expressions surrounded by curly braces example : int arr[5] = new int[5]; and int arr[] = { 0, 1, 2, 3, 4};

Workspace

Report Error


5. Which of these is necessary to specify at time of array initialization?
  • A. Row
  • B. Column
  • C. Both Row and Column
  • D. None of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

Row

Workspace

Report Error


Related Topics:

  • Data Types
  • Threads
  • Applets
  • java.lang Package
  • Packages
  • Exception Handling
  • Serialization
  • java.io Package
  • Collections
  • java.util Package

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • IT Courses Quiz

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions

Programming Quiz

  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • Python Programming
  • DataScience MCQ
  • Hadoop MCQ
  • Mongo DB MCQ
  • MySQL MCQ

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics

Our Sites

AView.in

© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy