Computer Applications
Give the output of the following program segment:
int x[] = {4, 3, 7, 8, 9, 10};
int p = x.length;
int q = x[2] + x[5] * x[1];
System.out.println("p=" + p);
System.out.println("q=" + q);
Give the output of the following program segment:
int x[] = {4, 3, 7, 8, 9, 10};
int p = x.length;
int q = x[2] + x[5] * x[1];
System.out.println("p=" + p);
System.out.println("q=" + q);