Home / Gopal Sharma / Programming Language MCQs
Programming Portal MCQs [366]
You will find all MCQs which are added in Programming Portal by Gopal Sharma
Q. What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
byte a[] = { 65, 66, 67, 68, 69, 70 };
byte b[] = { 71, 72, 73, 74, 75, 76 };
System.arraycopy(a , 0, b, 0, a.length);
System.out.print(new String(a) + " " + new String(b));
}
}
Q. Find the error in the following SQL statement?
CREATE TABLE person
( person_id SMALLINT, name VARCHAR, LAST VARCHAR
CONSTRAINTS pk_person PRIMARY KEY (person_id));
INSERT INTO person
VALUES( person_id, name, LAST)
(1, ’s’, ’p’);
INSERT INTO person
( person_id, name, LAST)
VALUES(1,’s’,’p’);