Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 1 ( I believe java was used ) public static void main ( String [ ] args ) throws Exception { int [ ]

Q1(I believe java was used)
public static void main(String[] args) throws Exception {
int[] array = new int[5];
for (int a : array){
System.out.print(a +"");
}
System.out.println();
}
What is the output?
A)00000
B)12345
C) No output because the array is not initialized
Q2
public static void main(String[] args) throws Exception {
int[][] myNumbers ={{1,2,3,4},{5,6,7}};
System.out.printf("%d %d %d
", myNumbers.length, myNumbers[0].length, myNumbers[1].length); }
What is the output?
A)244
B)234
C)243
Q3
public class Recursion {
public static void permutation(int num){
if (num ==0) return;
System.out.print(num --+"");
permutation(num);
}
public static void main (String[] args){
permutation(5);
}
}
What is the output?
A)43210
B)543210
C)54321
D) There is a bug and the program will never stop
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

Students also viewed these Databases questions