Which regular loop corresponds to this enhanced for loop? char[]vowels={'a','e','i','o','u'}; for (char item: vowels) { System.out.println(item); }     a.   for(inti=0;i

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter16: Searching, Sorting And Vector Type
Section: Chapter Questions
Problem 23SA
icon
Related questions
Question

Which regular loop corresponds to this enhanced for loop?

char[]vowels={'a','e','i','o','u'};
for (char item: vowels) {
System.out.println(item);
}
 
 
a.

 

for(inti=0;i<item;++i){
System.out.println(vowels[i]);
}


 

  b.

 

for(inti=0;i<item.length;++i){
System.out.println(vowels[i]);
}


 

  c.

 

for(inti=0;i<vowels.length;++i){
System.out.println(vowels[i]);
}
d.

 

for(inti=0;i<vowels.length;++i){
System.out.println(item[i]);
}

 

JAVA

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 4 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning