Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q 1 . What is the exact output of the following pleces of code? int [ ] array = { 9 , 5 , 8

Q1. What is the exact output of the following pleces of code?
int [] array ={9,5,8,1,11,3,10};
array[0]=2;
array [1]++;
array[2]=array[0]+array[1];
array[3]=array[2-1];
array 4= array.length;
array[5]=array[6];
array [6]--;
system.out.println (array[i]);
int [] grades ={30,90,80,50,70};
for (int i=0;i grades. length; i+=2)
system.out.println (grades [i]);
int [] grades ={30,90,80,50,70};
for (int i= grades.length-1; i0;i--
System.out.printin (grades [i]);
int y=0;
int [][]x={{1,3,5},{2,4,6}};
for (int i++j++y+=x[i][j]j=0;j. length; j++i=0;i. length; i++
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

More Books

Students also viewed these Databases questions

Question

Define the goals of persuasive speaking

Answered: 1 week ago