Sie sind auf Seite 1von 20

Question 1 Topic:Java,Sub-Topic:Java Fundamentals Consider the following code: class Acc_IO1{ public static void main(String a[]){ int

ascii; ascii = 'a'; System.out.write(ascii); } } What will be the output of above code? Choose most appropriate option.' a. b. c. d. e. 97 a 98 b None of the above

Question 2 Topic:Java,Sub-Topic:Java Fundamentals Consider the following code: public class Acc_Byte1{ public static void main(String [] a){ int b1=80; int b2=100; int b3; b3 = ++b1 * b1 /100 + ++b2; System.out.println("b3 = " + b3); } } What will be the output of above statement ? Choose most appropriate option. a. b. c. d. b3 = 165 b3 = 166 b3 = 80 b3 = 167

Question 3 Topic:Java,Sub-Topic:Java Fundamentals Consider the following code: public class Sacrifice{ private int variableA = showOutput(); private int variableB = 15; private int showOutput(){ return variableB; } public static void main(String args[]){ System.out.println((new Sacrifice()).variableA); } } What will be the output of the above code? Choose most appropriate option. a. b. c. 0 15 6

Question 4 Topic:Oracle,Sub-Topic:SQL Which of the clause is used to check a list of values in a column ? Choose most appropriate option. a. b. c. d. EXISTS IN AND NOT

Question 5 Topic:Oracle,Sub-Topic:SQL The EMP table is currently empty. Which of the following query is used to modify EMP table to add a primary key on EMPID column ? Choose most appropriate option a. b. ALTER TABLE emp MODIFY CONSTRAINT emp_id_pk PRIMARY KEY (empid); ALTER TABLE emp ADD CONSTRAINT emp_id_pk PRIMARY KEY (empid);

c. d. e.

ALTER TABLE emp ADD CONSTRAINT emp_id_pk PRIMARY KEY empid; ALTER TABLE emp ADD PRIMARY KEY empid; ALTER TABLE emp ADD CONSTRAINT PRIMARY KEY (empid);

Question 6 Topic:Oracle,Sub-Topic:SQL You create a table but then subsequently realize you need a few additional columns. To add those new columns later, which of the following command is used for the above query. Choose most appropriate option a. b. c. d. CREATE OR REPLACE TABLE ALTER TABLE CREATE TABLE TRUNCATE TABLE

Question 7 Topic:Oracle,Sub-Topic:SQL Which of the following query is VALID ? Choose most appropriate option a. UPDATE emp SET mgr=7839 WHERE mgr<> 7839 and EMP IN(SELECT mgr FROM emp GROUP BY mgr HAVING COUNT(*)>2) ORDER BY mgr; b. UPDATE emp SET mgr=7839 WHERE mgr<> 7839 and EMP IN(SELECT mgr FROM emp HAVING COUNT(*)>2); c. UPDATE emp SET mgr=7839 WHERE mgr<> 7839 AND empno =(SELECT mgr FROM emp WHERE COUNT(*) >2 GROUP BY mgr); d. UPDATE emp SET mgr=7839 WHERE mgr<> 7839 AND empno IN(SELECT mgr FROM emp GROUP BY mgr HAVING COUNT(*)>2); Question 8 Topic:Oracle,Sub-Topic:SQL Consider the following query: SELECT e1.*,e2.* FROM emp_1 e1,emp_2 e2 WHERE e1.sal=e2.deptno; Assume that EMP_1 consists of empno,ename and sal whereas EMP_2 consists of deptno and hiredate. What will happen when above query is executed?

Choose appropriate option. a. b. c. No rows will be displayed All the rows from both the tables will be displayed Query will fail as the comparison is done between non-compatible columns

d. All the records having salary equal to the total salary of the respective deptnos will be displayed Question 9 Topic:Oracle,Sub-Topic:SQL Which of the following are NOT VALID for Views ? Choose two appropriate options a. b. c. d. Views does not contain data. The definition of views are stored in data dictionary. Views can contain indexes Views are stored in a specific location.

Question 10 Topic:HTML,Sub-Topic:CSS Which of the following are VALID for Cascading Style Sheets ? Choose three appropriate options a. b. c. d. hr{color:pink} font {color:green} body {background-color:pink} body {background:color:=red}

Question 11 Topic:JavScript,Sub-Topic:Javascript Consider the below code: <html> <head> <script type="text/javascript"> document.write("100"+250+400); </script>

</head> </html> What will be the output of the above code? Choose most appropriate option. a. b. c. d. 100250400 750 0 Error - No Output

Question 12 Topic:Java, Sub-Topic:Java Fundamentals class Main{ public Main(){ System.out.println("Calling ASE"); } } public class Attention{ public static void main( String args[]){ Main the_values[] = new Main[3]; } } How many times will the constructor Main() be invoked? Choose most appropriate option. a. b. c. d. Once Twice Thrice Zero times

Question 13 Topic:Java,Sub-Topic:Constructor Consider the following code: class Cafe { public int cafe = 0; public Cafe(String test) { cafe = 9;

} public Cafe() { } } class Cafeteria extends Cafe { public Cafeteria(String text) { cafe = 11; } public static void main(String args[]) { System.out.println(new Cafeteria("Test").cafe); } } Which among the following is the correct option? Choose most appropriate option. a. b. c. d. e. Test 9 0 11 Test 11

Question 14 Topic:Java,Sub-Topic:Classes and Objects Consider the following code: public class Selection{ static Selection display(){ System.out.print(" Great "); return new Selection(); } public static void main(String[] args){ Selection output = display(); } public String toString() { return " Performance "; } } What will be the output of the above code?

Choose most appropriate option a. b. c. d. Great Performance Great Performance None of the above

Question 15 Topic:Java,Sub-Topic:Polymorphism Consider the following code: class OutsideMain{ void display(){ System.out.println("Upper"); } } public class Mainclass extends OutsideMain{ void display(){ System.out.println("Lower"); } public static void main(String[] args){ Mainclass mainclass = new Mainclass(); mainclass.display(); } } What will happen if the above code is executed? Choose most appropriate option. a. b. c. Upper gets printed Lower gets printed Upper and Lower both gets printed in separate lines.

Question 16 Topic : JAVA, Sub-Topic : Classes and Objects Consider the following code: public class Know { public static void main(String[] args) { String string = "Accenture"; Object object = string; if (object.equals(string)){ System.out.print("1"); } else { System.out.print("2"); }

if (string==(object)){ System.out.print("3"); } else { System.out.print("4"); } } } What will be the output of above code? Choose the correct option. a. b. c. d. 23 13 24 14

Question 17 Topic:OOAD&UML, Sub-Topic:OOAD&UML In the figure given, What :ATMUI and Customer represents ? Choose most appropriate option. Click on the hyperlink to view the figure. a. b. c. d. Lifeline Object Instances Activation Bars Frames

Question 18 Topic:Java,Sub-Topic:Fundamentals Consider the below code: public class SwitchD { public static void main(String a[]) { int i=1; switch (i) { case 0: System.out.println("zero"); break; case 1: System.out.println("one"); case 2: System.out.println("two"); default: System.out.println("default"); } } } What is the output of the above code ? Choose most appropriate option. a. b. one one, default --> Both will be printed in separate line.

c. d.

one, two, default --> All will be printed in separate line. default

Question 19 Topic:Java,Sub-Topic:Fundamentals Consider the following code: public class Fantastic { void showcase(int a, int b) { System.out.println("showA"); } public static void main(String args[]) { new Fantastic().showcase(6,787); } void showcase(long a, long b) { System.out.println("showB"); } void showcase(short a, short b) { System.out.println("showC"); } } What will be the output of above code? Choose most appropriate option. a. b. c. d. showA showB showC None of the above

Question 20 Topic:Java,Sub-Topic:Fundamentals Consider the following code: class Numerator { void compute() { show(); } static void show() { System.out.println("Numerator"); } } public class Fraction extends Numerator { void compute() {

System.out.println("Denominator"); } public static void main(String args []) { } { Numerator num=new Fraction(); num.compute(); } } What will happen when the above code is executed? Choose most appropriate option. a. b. c. d. Numerator Denominator Numerator Denominator Program will compile successfully but nothing will printed at console.

Question 21 Topic: Java, Sub-Topic: Inheritance Consider the following code: class Demo1 { void Calculate() { int a=10;int b=99;int c; c=b++ + a+ ++b + 10; System.out.print("c=" + c); } } public class Demo extends Demo1 { public void methodOne() { System.out.println(" Demo1.Calculate"); } public static void main(String[] args) { ((Demo1)new Demo()).Calculate(); System.out.println(" Demo.Calculate"); } } What will be the output of the above code? Choose most appropriate option. a. b. c. c=220 Demo.Calculate c=220 Demo1.Calculate c=220 Demo.Calculate Demo1.Calculate

Question 22 Topic: JAVA, Sub-topic : Java Fundamentals Consider the following statement: int number[] = new int[5]; After execution of this statement, which of the following are true? Choose two appropriate options. a. b. c. d. number[0] is undefined number[5] is undefined number[4] is null number[2] is 0

Question 23 Topic: Java, Sub-Topic: Fundamentals Consider the following code: class Exam { char str [] = {'E','x','a','m'}; void expectation() { char str1[]= {' ','D','a','y'}; System.out.print(str); System.out.print(str1); } public static void main(String args[]) { Exam day=new Exam(); day.expectation(); } } What will be the output of above code? Choose appropriate option. a. b. c. d. Exam Day Day Exam Exam Day

Question 24 Topic: Java, Sub-Topic:Inheritence

Consider the following code: class Acc { static int num1=99; protected static int num2=-101; } class Acc_Fundamental extends Acc { public static void main (String[] args) { num2--; num1--; System.out.print(num1 + " "); System.out.println(num2); } } What will be the output of the above code? Choose appropriate option. a. b. c. d. 98 102 98 -102 98 -101 98 -100

Question 25 Topic:Oracle,Sub-Topic:SQL Sumit wants to disable the not NULL constraint in the PROJECTS_VALUE column of PROJECTS table. Choose most appropriate option that can be used. a. b. c. d. ALTER TABLE PROJECTS MODIFY PROJECTS_VALUE NULL; ALTER TABLE PROJECTS MODIFY PROJECTS_VALUE NOT NULL; ALTER TABLE PROJECTS ADD PROJECTS_VALUE NOT NULL; ALTER TABLE PROJECTS MODIFY PROJECTS_VALUE IS NULL;

Question 26 Topic:Oracle:Sub-Topic:SQL Database design changes can be made dynamically without the users being aware of it. Identify the above E.F.Codd's rule. a. Logical Data Independence

b. c. d.

Physical Data Independence Conceptual Data Independence None of the above

Question 27 Topic:HTML,Sub-Topic:HTML Which of the following statement about HTML is not true ? Choose the most appropriate option. a. HTML is encoding language for creating web pages that can be displayed by any browser. b. It is written using plain text editors or HTML editor.

c. HTML is more concerned about the content of the web page than the visual interface d. It can have extension .htm or .html

Question 28 Topic:SQL,Sub-Topic:Aggregate Functions Consider the following query: SELECT COUNT(empno) FROM ase WHERE empno=54 OR name LIKE 'J%' Refer the table given belowand find out the output of the above query. Choose most appropriate option. EMPNO NAME AGE LOCATION -----------------------51 Amit 25 Bang6 52 Aman 24 Bang4 53 Karan 24 Bang4 54 Farooq 23 Bang1 55 Guru 22 Bang3 56 Lakshmi 22 Bang4 57 Swaroop 20 Bang4 a. b. c. d. 1 2 3 4

Question 29 Topic:SQL,Sub-Topic:E-R Diagram "Data Modelling helps us to graphically represent the relationships between the collection of data in a system." Keeping the above statement in mind,identify the options that can help to achieve the task? Choose two appropriate options. a. b. c. d. E-R Diagrams Normalization Implementing all E.F.Codd's rules Using constraints and privileges.

Question 30 Topic:HTML,Sub-Topic:HTML Which of the following option will give the output as shown in the attached figure? Click on hyperlink to view the figure. Choose appropriate option. a. b. c. d. <html> Today is 4<sup>th</sup> of Feb <html> <html> Today is 4<sub>th</sub> of Feb <html> <html> Today is 4<superscript>th</superscript> of Feb <html> Not possible with HTML

Question 31 Topic:Javascript,Sub-Topic:Javascript Consider the following code: <html> <body> <script type="text/javascript">

mynumber =150; mynumber="Number One"; document.write("The value is "+mynumber); </script> </body> </html> What will happen if the above code is executed? Choose most appropriate option. a. b. c. d. The value is 150 gets printed. 150 gets printed The value is Number One gets printed None of the above

Question 32 Topic:OOAD,Sub-Topic:UML Refer to the figure given and pick out the option that best decribes it. Click on hyperlonk to view the figure. Choose appropriate option. a. b. c. d. "A" represents a class being extended by the class "B" "A" represents an interface being implemented by the class "B" "A" represents a class being implemented by the class "B" "A" represents an interface being implemented by the interface "B"

Question 33 Topic:Java,Sub-Topic:UML Which of the following statement is TRUE regarding UML Diagrams ? Choose most appropriate option. a. The states in a StateChart Diagram cannot branch off to other states or itself depending on the messages or events it can receive. b. Sequence diagrams show a group of objects interacting within a system to perform a specific functionality. c. In a composition relationship, the objects can exist independent of each other

d. Each use case is a low level description of a functionality that must be supported by the system. Question 34 Topic:Oracle, Sub-Topic:DML Gyan needs to change the definition of an existing emp table, the column EMPNAME is to be changed so that it can hold characters up to 2000 characters. Assume that currently column holds 1000 characters. Which of the following statement can be used for this purpose?

Choose most appropriate option. a. b. c. d. ALTER TABLE emp MODIFY EMPNAME TO CHAR2(2000); ALTER TABLE emp ALTER EMPNAME CHAR2(2000); ALTER TABLE emp CHANGE EMPNAME VARCHAR2(2000); ALTER TABLE emp MODIFY EMPNAME VARCHAR2(2000);

Question 35 Consider the query: UPDATE emp SET ename='LEOPARD' WHERE deptno IN (SELECT deptno FROM EMP GROUP BY job,deptno); What will happen if the above query is executed? Choose most appropriate option. a. b. c. d. Ename column for all the records will be updated to 'LEOPARD' Query fails as subquery returns multiple records Query fails as sub-query cannot be used in UPDATE clause Job column for all records will be updated to "LEOPARD"

Question 36 Topic:Oracle, Sub-Topic:SQL "EMPLOYEES" table has a column named "SALARY" containing records of 5000 employees.Out of 5000 employees,150 of them have been assigned an uniform salary of 1000 rupees each,remaining have not been assigned any salary. Consider the following query: SELECT AVG(SALARY) FROM EMPLOYEES; What will be the output of above query ? Choose most appropriate option. a. b. c. d. 1000 150 5000 100

Question 37 Topic:Oracle,Sub-Topic:Sub-Query

The query which is placed before the inner query is called as the ______________. Fill in the blank with an appropriate option. a. b. c. d. Outer query. Child query. Single Query. Sub Query.

Question 38 Topic:Oracle, Sub-Topic:DML Consider the following statement: SELECT ename FROM employee WHERE ename LIKE '_a%'; What is the output of the above command? Choose most appropriate option. a. b. c. d. Display names starting with "a" Display names which do not start with "a" Display names which do not start with "a" but has "a" as the second character. Display names that have second last character as "a"

Question 39 Topic:Java,Sub-Topic:UML Which of the following statements are TRUE with respect to Sequence Diagram ? Choose most appropriate option. a. Messages are indicated as solid horizontal arrows attached to the timeline of the source object to the target object b. Messages are indicated as solid vertical boxes that run along horizontally towards the source object or target object c. Messages are indicated as dotted lines that are attached from the timeline of the source object to the target object Question 40 Topic:OOAD,Sub-Topic:UML Which of the following options are VALID with respect to Object Oriented Analysis and Design (OOAD)?

Choose three appropriate options. a. OOAD is a methodology to analyze,design and develop applications using objects and their relations. b. OOAD is a software engineering approach that models a system as a group of interacting objects. c. OOAD is to emphasize considering a problem domain and bring out a logical solution from the perspective of objects. d. OOAD is a tool that helps in creating objects and defining relationships.

Das könnte Ihnen auch gefallen