Lowest price ever! Learn Generative AI for 48% less!
Get my discountQ&A Discussions
C# method confusion...
4 Votes
20 AnswersWhat is the output and why?
public static int[] make (int n){
int[]a=new int [n];
a [i]=i+1;
}
return a;
}
public static void dub (int []jub){
for (intent i=0;i <jub.length;i++){
jub*=2;
}
}
public static int mus (int []zoo){
int jus=0;
for (int i=0;i <zoo.length;i++){
jus+=zoo [i];
}
return jus;
}
public static void main (String [] args){
int [] bob =make(5);
dub (bob);
System.out.println (mus (bob));
}
0 Votes
2 AnswersHot today
Words in Intermediate C#
1 Votes
..
1 Votes
Classes and objects
0 Votes
Code couch: Halloween candy
1 Votes
Solo Learn Badges
0 Votes
Price of generative AI
1 Votes
Is this a bug?
0 Votes