Question
What is the output of the following JAVA statements?
int [ ] p = new int [10];
int [ ] q = new int [10];
for (int k = 0; k < 10; k ++)
p[k] = array [k];
q = p;
p[4] = 20;
System.out.println(array [4] + “:” + q[4]);
a.
20:20
b.
18:18
c.
18:20
d.
20:18
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Given the array of integers ‘array’ shown below. What is the output of the following JAVA statements? int [ ] p = new int [10]; int [ ] q = new int [10]; for (int k = 0; k...
Similar Questions
Discover Related MCQs
Q. Consider the following JAVA program:
public class First {
public static int CBSE (int x) {
if (x < 100) x = CBSE (x +10);
return (x - 1);
}
public static void main (String[] args){
System.out.print(First.CBSE(60));
}
}
What does this program print?
View solution
Q. What can you say about the following statements?
I. XML tags are case-insensitive.
II. In JavaScript, identifier names are case-sensitive.
III. Cascading Style Sheets (CSS) cannot be used with XML.
IV. All well-formed XML documents must contain a document type definition.
View solution
Q. ................. is subject oriented, integrated, time variant, non-volatile collection of data in support of management decisions.
View solution
Q. In Data mining, classification rules are extracted from ..............
View solution
Q. Discovery of cross sales opportunities is called as ...............
View solution
Q. In Data mining, .............. is a method of incremental conceptual clustering.
View solution
Q. Match the following with reference to Functional programming history:
a. Lambda calculus i. Church, 1932
b. Lambda calculus as
programming language ii. Wordsworth, 1970
c. Lazy evaluation iii. Haskel, 1990
d. Type classes iv. Mecarthy, 1960
Codes :
a b c d
View solution
Q. Aliasing in the context of programming languages refers to:
View solution
Q. Which of the following is not used in standard JPEG image compression?
View solution
Q. Which of the following is a source coding technique?
View solution
Q. If the histogram of an image is clustered towards origin on X-axis of a histogram plot then it indicates that the image is .............
View solution
Q. Which of the following statements is incorrect for a Windows Multiple Document Interface (MDI)?
View solution
Q. The region of feasible solution of a linear programming problem has a ............... property in geometry, provided the feasible solution of the problem exists.
View solution
Q. Consider the following statements:
(a) Revised simplex method requires lesser computations than the simplex method.
(b) Revised simplex method automatically generates the inverse of the current basis matrix.
(c) Less number of entries are needed in each table of revised simplex method than usual simplex method.
Which of these statements are correct?
View solution
Q. Which of the following is characteristic of an MIS?
View solution
Q. ................. system is market oriented and is used for data analysis by knowledge workers including Managers, Executives and Analysts.
View solution
Q. .................. allows selection of the relevant information necessary for the data warehouse.
View solution
Q. ................. uses electronic means to transfer funds directly from one account to another rather than by cheque or cash?
View solution
Q. As compared to rental and leasing methods to acquire computer systems for a Management Information System (MIS), purchase method has following advantage :
View solution
Q. Consider the conditional entropy and mutual information for the binary symmetric channel. The input source has alphabet X={0,1} and associated probabilities {1/2,1/2}. The channel matrix is as shown below, where p is the transition probability. Then the conditional entropy is given by :
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Current Trends and Technologies? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!