double[] a = new double[5]; for (int i = 0; i<5; i++) a[i] = Math.pow(2, i); pub
ID: 3538105 • Letter: D
Question
double[] a = new double[5];
for (int i = 0; i<5; i++)
a[i] = Math.pow(2, i);
public class Node
{
private int info;
private Node next;
//Class methods
}
long x(int n)
{
if (n == 1) return 1;
else return n * x(n-1);
}
What will be displayed by the System.out.prinltn statement:
System.out.println(x(5)); ?
int RecFunction(int n)
{
if (n==0) return 0;
else return RecFunction(n-1) + n;
}
What is the output in the statement: System.out.println(RecFunction(0)); ?
B. larger than or equal to
C. two times the value of
D. none of the above
Explanation / Answer
here are your answers :
1 ) LARGER THAN.......
2 ) D option i.e using list , linked list , array
3 ) heap
4 ) D option i.e 4.0
5) D option i.e 1
6) mathValues.insert(1) i.e A option
7) C option i.e Linked list
8) Don't Know
9) D option i.e 0
10) A option i.e Sequential Search
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.