You are on page 1of 29

C, C++ and Data Structures (60 Minutes) b) Virtual functions, derived class pointer and

1. What will be the output of the following C some objects.


program? c) Virtual functions, base class object and some
objects.
#include<stdio.h> int main() { int x; char *string d) virtual functions, base class pointer and some
= "I am CDACIAN"; for(x=-1; x<=10; x++) objects
{ if(x < 5) continue; else break; printf("%c",
string[x]); } return 0; } 9. Which of the following casting operators use
a) Infinite RTTI?
b) no-output a) const_cast
c) I am b) static_cast
d) I am C c) dynamic_cast
2. Which of the following cannot be checked in a d) reinterpret_cast
switch-case statement?
a) character
10. Which of the following is the most general
b) integer exception handler?
c) float a) catch(std::exception)
d) enum b) catch(std::any_exception)
c) catch(…)
3. What is the use of break statement?
d) catch()
a) To terminate a case in the switch statement.
b) To force terminate a loop
11. Which of the following operators can be
c) Both A & B implemented as a nonmember operator?
d) Only B a) =
4. The keyword used to transfer control from a b) ()
function back to the calling function is-
c) [ ]
a) switch
d) +
b) goto
c) break
12. Considering the variable str is of type
d) return std::string.What is the correct way to get the C-
5. By default size of the structure is determined style string from str?
by a) Cast str to const char * as ((const char *)&str)
a) Number of arguments present inside the b) Use str.c_str()
structure.
c) Use str.get_c_style_string()
b) it depends on the implementation of the
d) Use str.data()
compiler
c) by the largest type present in the structure
13. What is the output of the following code?
d) None of the above.
6. The most important, difference between C and class test { public : int x; }; int main() { test *p1,
C++ is *p2; test ob; ob.x = 87; p1 = &ob; p2 = p1;
a) Object oriented implementation is possible in delete (&ob); cout << p2->x; return 0; }
C++, not possible in C. a) Garbage Value
b) Overloading is possible in C++, not possible b) Compilation Error
in C. c) 87
c) C is strongly typed and C++ is weakly typed. d) Run Time Error
d) C is weakly typed, C++ is strongly typed.
7. Destructors will get called when the object 14. Object-Oriented Programming Language
a) comes out of a function supports
b) comes out of the class a) Inheritance
c) Depends on storage class. b) Polymorphism
d) All the above. c) Encapsulation
8. Runtime polymorphism is possible only if we d) All of the above
have.
a) Non virtual functions, derived class pointer 15. What is a class?
and some objects in hierarchy.
a) It is a region of storage.
b) It defines a data type. Constructor : Derived Destructor : Base
c) It is exactly same as a struct in Destrcutor : Derived
c. b) Constructor : Base
d) All of the above
Constructor : Derived Destrcutor : Derived
c) Constructor : Base
16. What is the output of the program?
Constructor : Derived Destructor : Derived
#include <iostream.h> void main () { for(int j =
Destrcutor : Base
1, sum = 0; j < 5; j++) sum += j; sum = j; cout
d) None of the above
<< sum; }
a) 5
b) 10 21. Which of the following statements is false?
c) Compilation error. Undefined variable sum a) Conversion operator function must return a
and j value
d) 6 b) Conversion operator function must be written
in destination
17. What will be the output? c) Conversion operator function does not accept
any argument
class A { public : A() { this -> fun(); } virtual d) Conversion operator function must be a
void fun() { cout<<”fun A”; } }; class B : public member function.
A { public : virtual void fun() { cout << “fun
B” ; }; void main() { B *ptr = new B; ptr -> 22. Difference between text and binary mode is
fun(); } based on
a) fun A a) How newline is treated
b) fun B b) How End Of File is represented
c) fun A fun B c) How numeric data is stored
d) fun B fun A d) all of the above

18. Which of the following cannot be overloaded 23. Templates can be distributed to the client
a) Functions through
b) Classes a) header file
c) Keywords b) lib file
d) Operator c) both A and B
d) templates can not be distributed at all
19. For performing late binding the compiler
creates 24. What will be output of the following?
Page 3 b) an array of pointers b) an array of
pointers #include<iostream.h> class name { public:
a) vtable and vpointer name() { cout<<endl<<"in def con\n"; }
b) an array of pointers name(name n) { cout<<endl<<"in copy con\n"; }
c) a late binding function }; void main() { name n1; name n2(n1); }
d) none of the above a) output infinite “in copy con”
b) compile error
20. What will be output of following code? c) output “in def const in copy con”
d) runtime error
#include <iostream.h> class Base { public:
Base() { cout<<"Constructor: Base"<<endl; } 25. Balance Factor of AVL Tree
virtual ~Base() { cout<<"Destructor : a) Height of right sub-tree at that node - height of
Base"<<endl; } }; class Derived: public Base left sub-tree at that node.
{ public: Derived() { cout<<"Constructor: b) Height of left sub-tree at that node - height of
Derived"<<endl; } ~Derived() right sub-tree at that node.
{ cout<<"Destructor : Derived"<<endl; } }; int c) Balance factor of root node
main() { Base *Var = new Derived(); delete Var;
d) Balance Factor of leaf nodes
return 0; }
a) Constructor : Base
26. Consider a binary max-heap implemented d) Byte
using an array. Which one of the following array 32. An AVL tree is:
represents a binary max-heap? (A tree is max- a) Binary search tree with property that each
heap if data at every node in the tree is greater node has
than or equal to its children’s data.) Page 5 d) None of Above d) None of Above
a) 25, 12, 16, 13, 10, 8, 14 equal difference between Left and right sub trees
b) 25,14,13,16, 10,8,12 b) A tree having finite number of nodes
c) 25, 14,16,13,10, 8, 12 c) A tree having single node
d) 25, 14, 12, 13, 10, 8, 16 d) None of Above

27. Difference between Tree and Graph 33. What is the output of the following?
a) A tree is a specialized case of a graph. A tree
is a connected graph with no circuits and no self #include <iostream.h> class test { char x; static
loops. char c; }; void main() { test a; cout <<
b) A graph is a special case of tree. sizeof(a); }
c) A tree is nonlinear data structure, graph is a) 1
linear data structure. b) 2
d) Graph is created using tree as basic elements. c) 4
28. Adjacency matrix is d) Based on Compiler
a) The graph is made up of a set of vertices and a
matrix, whose rows and columns are indexed by 34. What is the signature of the output operator
vertices, and which contains a 1 entry if the for class test?
vertices are connected. a) friend ostream & operator << (test &);
b) The graph is made up of a set of vertices and a b) ostream & operator << (test &);
matrix, whose rows and columns are indexed by c) ostream & operator << (ostream &, test &);
no of edges, and which contains a positive entry d) friend ostream & operator << (ostream &, test
if the &);
vertices are connected.
c) Matrix which represents the weight of the 35. What is the member function called in the
edges statement "test b = a" shown below?
d) Matrix which represents the relation of edges
and vertices in terms of value in integers. void main() { test a(10); test b = a; }
a) Assignment operator
29. Consider the following tree. b) Constructor
c) Copy constructor
If this tree is used for sorting then a new number d) None of the above
8 is placed as the: 36. A variable that is part of a class, yet is not
a) left child of node labelled 30 part of an object of that class, is called a?
b) right child of node labeled 5 a) Static member
c) right child of node labeled 30 b) Friend member
d) left child of node labeled 10 c) Constant member
d) Non-static member
30. Consider the following tree.

If the post order traversal gives ab –cd * + then 37. Which of the following is true about the
the labels of the nodes 1, 2, 3, ….. will be insertion sort algorithm?
a) +, -, *, a, b, c, d a) This is advisable when the Data movement is
b) a, -, b, +, c, *, d more.
c) a, b, c, d, -, *, + b) This is advisable when Data is nearly/almost
sorted.
d) -, a, b, +, *, c, d
c) This is advisable when the data is complex
data-structure.
31. What does “B” in B–Tree mean?
d) Complexity of this algorithms is N log N
a) Better
b) Balanced
38. Which of the following sorting algorithm’s
c) Binary complexity is not always N Log N?
a) Quick Sort
b) Merge Sort
c) Heap Sort
d) None of the above

39. Which sorting algorithm is best when data is


almost sorted?
a) Insertion Sort
b) Selection Sort
c) Merge Sort
d) Quick Sort

40. Which of the following is true about AVL


Tree?
a) Insertion
b) Deletion
c) Updation
d) Retrieval
a) CORRELATED
b) SUBQUERY
c) OUTER JOIN
SECTION-1: Database technologies (DBT) d) INNER JOIN
(60 Minutes) 9. Assuming today is Monday, 21 NOV 2000,
1. Entity Integrity is managed in RDBMS with what is returned by this statement: SELECT
the help of __________ constraint. to_char(NEXT_DAY(sysdate, 'MONDAY'),
a) Primary key 'DD-MON-RR') FROM dual;
b) Not Null a) 03-NOV-00
c) Unique b) 10-NOV-00
d) Foreign key c) 28-NOV-00
2. Normalisation is needed to reduce data d) 17-NOV-00
__________. 10. In a PL/SQL block, a variable is declared as
a) Redundancy NUMBER without an initial value. What will its
b) Complexity value be when it is first used in the executable
c) Visualization section of the PL/SQL block?
d) Processing a) NULL
3. Repeating groups are removed from table b) 0
design. This is definition of which Normal c) Results in a compilation error
Form? d) An exception will be raised
a) 1st Normal Form 11. Functions for error trapping are contained in
b) 2nd Normal Form which section of a PL/SQL block?
c) 3rd Normal Form a) Header
d) 4th Normal Form b) Exception
4. Denormalisation is needed to improve c) Executable
__________ efficiency. d) Declarative
a) SELECT 12. Which of the following is true concerning
b) INSERT triggers?
c) UPDATE a) You do not create them with SQL.
d) DELETE b) They execute against only some applications
that access a database.
5. Complete the following statement: c) They have an event, condition, and action.
d) They cannot cascade (cause another trigger to
In a relation you have attributes A,B,C A is fire).
Primary Key C is functionally dependent on B 13. What is a DATABLOCK?
Then A -> C is called as ___________. a) Set of Extents
a) functional dependency b) Set of Segments
b) partial dependency c) Smallest Database storage unit
c) multi-valued dependency d) None of the above
d) transitive dependency 14. Which component is not part of the Oracle
6. Which normal form eliminates partial instance?
dependency? a) System Global Area...
a) First normal form b) Processor Monitor.
b) Second normal form c) Control File.
c) Third normal form d) Shared Pool.
d) None of the options 15. Choose the right hierarchy, from largest to
7. To produce a meaningful result set without smallest, from this list of logical database
any cartesian products, what is the minimum structures
number of join conditions that should appear for a) Database, tablespace, extent, segment, block...
joining four-table join? b) Database, tablespace, segment, extent, block...
a) 5 c) Database, segment, tablespace, extent, block.
b) 3 d) Database,extent ,tablespace ,segment ,block.
c) 4 16. What is true about the set of statements?
d) No such criteria a) The describe dept statement displays the
8. Which query is evaluated once per row structure of dept table
processed by the parent statement?
b) The rollback statement frees the storage space b) Role
occupied by dept table c) Table
c) the describe dept statement returns an error d) Dictionary
object dept doesn’t exist 21. Which type of index should be used on a fact
d) the describe dept statement displays structure table?
of dept table only, if there is a commit statement a) A Binary Index
b) A Bitmap Index
17. This statement fails when executed: c) A Metadata Index
d) A Database Schema Index
CREATE OR REPLACE TRIGGER 22. A __________ is a replica of a target master
CALC_TEAM_AVG AFTER INSERT ON table from a single point-in-time.
PLAYER BEGIN INSERT INTO a) Table space
PLAYER_BATSTAT (PLAYER_ID, b) Table
SEASON_YEAR, AT_BATS, HITS) VALUES
c) View
(:NEW. PLAYER_ID, 1997, 0, 0); END; To
which type must you convert the trigger to d) Snapshot
correct the error? 23. Which of the following option is correct if
a) Row you need to back up the data only for changes
that have been committed since the last complete
b) Statement
backup was performed
c) ORACLE FORM trigger a) Full backup.
d) Before b) Differential backup.
18. Following statements are given to create
c) Transactional backup.
clustered tables
d) None of these.
CREATE CLUSTER DEPT_CLUSTER
(DEPTNO NUMBER); What statement will you 24. Which of the following is NOT a type of
give to create clustered tables? user-managed incomplete recovery?
a) Create table TEMP (ID number, NAME a) Time-based recovery.
varchar2 (10)) cluster DEPT_Cluster b) Query-based recovery.
(DEPTNO); c) Cancel-based recovery.
b) Create table TEMP (ID number, NAME d) Changed-based recovery.
varchar2 (10), DEPTNO number) cluster 25. In which areas of the PL/SQL block must
DEPT_Cluster (DEPTNO); code be placed in order to handle Oracle-defined
c) Create table TEMP (ID number, NAME exceptions?
varchar2 (10), DEPTNO number (4)) cluster a) Declaration section only
DEPT_Cluster (DEPTNO); b) Declaration and executable sections only.
d) None of the above c) Exception handler only
19. HR department wants to drop the d) Declaration, executable, and exception
DEPT_CLUSTER cluster which is having handler sections.
multiple clustered tables. 19. HR department 26. ____________ exception directs the
wants to drop the DEPT_CLUSTER cluster complier to add the user defined error message to
which is having multiple clustered tables. the oracle error number
19. HR department wants to drop the a) Pragma Init Exception
DEPT_CLUSTER cluster which is having b) Pragma Exception
multiple clustered tables. c) ORA_EXCEPTION
d) ORA_USER_EXCEPTION
What statement will you give to drop the 27. Which are implicit cursor attributes?
DEPT_CLUSTER cluster? a) %found
a) Drop cluster DEPT_CLUSTER including b) %notfound
tables cascade constraints; c) %rowcount
b) Drop cluster DEPT_CLUSTER with tables; d) All of the above
c) Drop cluster DEPT_CLUSTER cascade 28. The RAISE_APPLICATION_ERROR( )
tables; procedure defines error numbers in which of the
d) Drop DEPT_CLUSTER including tables; following numeric ranges?
20. Privileges are assigned to users through a) -00000 and –99999
________________ b) -01200 and -01299
a) DBA c) -00030 and –00039
d) -20000 and –20999 a) Data files and redolog files
29. The transaction control that prevents more b) Redolog files and control files
than one user from updating data in a table is c) Control Files and datafiles
called d) Data files, redolog files and control files
a) Locks 38. Which is most reliable method of backup
b) Commits among following?
c) Rollbacks a) EXPORT
d) Savepoints b) RMAN
a) select dept, avg(salary) from emp; a) select c) Cold/off-line backup
dept, avg(salary) from emp; d) Hot/on-line backup
30. Which of the following SELECT statement 39. In SQL-SERVER 2005 which database is
will produce an error? used as template database when user creates
a) select dept, avg(salary) from emp; database?
b) select dept, avg(salary) from emp where a) master
dept=20; b) msdb
c) select dept, avg(salary) from emp group by c) tempdb
empid; d) model
d) None of the above 40. In SQL-SERVER 2005 which 2 files would
31. The owner of all data dictionary tables in be created when you create database?
Oracle is a) Primary data file and transaction log file
a) SYSTEM b) Primary data file and secondary data file
b) SYS c) Secondary data file and transaction log file
c) INTERNAL d) Primary and secondary data files and
d) Users transaction log file
32. Oracle 8i runs on
a) Windows NT
b) UNIX
c) Solaris
d) All above
33. When you do an OS copy of Control, Data
and Log files, it is known as __________
backup.
a) Physical
b) Logical
c) Automatic
d) All of the above
34. Which of the following is a valid option in
EXP utility?
a) Export full database
b) User
c) Table(s)
d) All of the above
35. Recovery is a process of copying data….
a) From data file to log file
b) From data file to control file
c) From log file to control file
d) From log file to data file
36. Which of the following superusers can
perform Recovery?
a) Admin
b) System
c) Sys
d) None of the above

37. In physical backup, which files must be


backed up for recovery?
scab) { System.out.println("attribute added"); }
public void attributeRemoved(ServletContextAttr
ibuteEvent scab) { System.out.println("attribute
SECTION-2: Enterprise Java (J2EE) (60 removed"); } } Which of the following statements
Minutes) about the above class is correct?
1. DriverManager is used to get the object? a) This class will compile as is.
a) Connection b) This class will compile only if the
b) Statement attributeReplaced() method is added to it.
c) Query c) This class will compile only if the
d) ResultSet attributeUpdated() method is added to it.
2. How to look for another row from ResultSet in d) This class will compile only if the
JDBC? attributeChanged() method is added to it
a) Using rs.hasNext() 10. Consider the following servlet code:
b) Using rs.next()
public class TestServlet extends HttpServlet
c) using rs.getRow() { private static StringBuffer staticVar = new
d) using rs.getNextRow() StringBuffer(); private StringBuffer instanceVar
3. How to make auto commit disable to achieve = new StringBuffer(); public void
transaction in JDBC? doGet(HttpServletRequest req,
a) Connection.setCommit(false) HttpServletResponse res) { private StringBuffer
b) connection.setCommitDisable () localVar = new StringBuffer(); } } Which of the
c) connection.setAutoCommit(fa lse) variables used in the above servlet reference
d) connection.commit(false) objects is thread safe? { private StringBuffer
4. Which package contains the JDBC classes? localVar = new StringBuffer(); } } Which of the
a) java.jdbc.* variables used in the above servlet reference
b) java.sql.* objects is thread safe? { private StringBuffer
c) java.lang.* localVar = new StringBuffer(); } } Which of the
variables used in the above servlet reference
d) java.io.*
objects is thread safe?
5. To read cookies we can use a) staticVar
a) HttpServletRequest b) instanceVar
b) HttpSErvletResponse c) localVar
c) Cookies d) None
d) None of the above. 11. Which of the following lines would initialize
6. To get a session object we need to use the out variable for sending a Microsoft Word
a) HttpServletRequest. file to the browser?
b) HttpServletResponse a) PrintWriter out =
c) HttpSession response.getServletOutput() ;
d) None of the above. b) PrintWriter out = response.getPrintWriter();
7. To do client side presentation we need to use c) OutputStream out = response.getWriter();
a) html d) OutputStream out =
b) jsp response.getOuputStream();
c) servlet 12. Consider the following code:
d) None of the above.
8. When all browsers close what happens in the public void doGet(HttpServletRequest req,
jsp? HttpServletResponse res) throws IOException
a) jsp destroy will get called { if(req.getParameter("switch") == null) { //1 }
else { //other code } } Which of the following
b) jsp init will get called
lines can be inserted at //1 so that the request is
c) jsp service
redirected to the collectinfo.html page?
d) None of the above. a) req.sendRedirect("collectinf o.html");
9. Consider the following class: b) req.redirect("collectinfo.ht ml");
c) res.direct("collectinfo.html" );
import javax.servlet.*; public class MyListener d) res.sendRedirect("collectinf o.html");
implements ServletContextAttributeListener 13. After EntityManager is closed, entity is in a
{ public void __________ state.
attributeAdded(ServletContextAttribu teEvent
a) dead
b) detached 20. Which of the following methods is
c) managed overridden by Action class?
d) persistent a) service ()
14. In case of EJB, Stub is not required for the b) execute ()
following view. c) run ()
a) outer view d) destroy ()
b) inner view
21. What services EJB containers provide to
c) remote view
Session beans?
d) local view
15. Which method inside MDB is called once the a) Caching and pooling
message arrives? b) EJB life cycle management
a) showMessage c) HTTP requests management
b) onMessage d) RMI services
c) doMessage 22. Which method of the jpa entity manager
d) none of these would you use to force synchronizing the
16. Which statement is correct from the persistence context from the database?
following? a) synchronize()
a) In case of Point – to – Point domain model a b) flush()
message is passed to Topic c) refresh()
b) From clause of JPQL uses table name and not d) persist()
the entity name.
23. Which of the following is NOT a JMS
c) No need to lookup JNDI in case of local view
message valid body format?
of EJB.
d) in case of JPQL Named parameters and a) ByteMessage
positional parameters can not be mixed in a b) ObjectMessage
single query c) CharMessage
17. Which of the following is NOT a step in the d) TextMessage
Hibernate communication with RDBMS?
1) Create HQL Query 24. What are the components of a JMS
2) Execute query to get list containing Java messaging application?
objects a) a Queue
3) Create session from configuration object b) a Message Producer
5) Get one session from the session factory 5) c) a WebService end point
Get one session from the session factory d) All of the Above.
4) Load the Hibernate configuration file and
25. JSP file are interpreted ____________
create configuration object
e) a) each instance
5) Get one session from the session factory
f) once
a) 2, 4, 5
g) every request
b) 2, 3, 4
h) none of the above
c) 1, 2, 4, 5
26. The default scripting language for JSP is
d) 1, 3, 4
________
18. __________ Objects can be passed across
a) java script
layers all the way up to the presentation layer
b) Vbscript
without having to use any DTOs (Data Transfer
Objects). You can later re-attach them to another c) Java
session d) Both a & c
a) Detached 27. The signatures of the ejbCreate methods
b) Persistent must meet the following requirement(s)
c) Removed a) The access return type must be void
d) Transient b) The modifier cannot be static or final
19. Struts framework is based on c) Arguments must be legal types for java RMI
a) Servlet, JSP and Java d) All of the above
b) Servlet, HTML and Java 28. An Enterprise JavaBeans can be deployed in
_______
c) Servlet, JSP, XML and Java
a) J2EE server
d) Applet, XML and Java
b) Weblogic
c) Websphere
d) All of the above b) HttpSessionAttributeListen er
29. 29. In the following which is the false c) HttpSessionListener
statement i.e which does not follow the rules of d) HttpSessionActivationListe ner
the Hibernate persistent class? 38. Select the correct statement about the
a) class must have overloaded constructor. following code. (Select one)
b) class must have an ID.
c) class attribute should be declared private and <%@ page language="java" %> <html><body>
getter setter method <% response.getOutputStream().print ("Hello ");
30. In the following which query type is out.print("World"); %> </body></html>
supported by Hibernate? 30. In the following a) It will print Hello World in the output.
which query type is supported by Hibernate? b) It will generate compile-time errors.
defined as per Java Bean rule. c) It will throw runtime exceptions.
d) class must not be final. d) It will only print Hello.
30. In the following which query type is 39. What will be the output of the following
supported by Hibernate? code? (Select one)
a) HQL query type
b) SQL query type <html><body> The value is <%=""%>
c) Criteria query type </body></html>
d) All of the above a) Compilation error
31. What is Session in hibernate? b) Runtime error
a) Session used to get connection to the database. c) The value is
b) Session is the unit of work and perform read, d) The value is null
write, update operation on the persistent 40. Which deployment descriptor element
instance. contains the <exception-type> element?
a) <error>
c) Session is the first level cache and all request
b) <error-mapping>
must pass through this.
c) <error-page>
d) All of the above
d) <exception-mapping>
32. What is secondary level cache in hibernate?
a) Hibernate Session-factory
b) Hibernate Session
c) Hibernate Util
d) Hibernate Query
33. EJB is used in
a) Presentation Layer
b) SErvice Layer
c) DAO layer
d) none of the above.
34. which of the following can do business logic
a) Sesion Bean
b) Message driven Bean
c) both a and b.
d) none of the above.
35. Stateful and Stateless is referred in context of
a) Session Bean
b) Message Driven Bean
c) JPA
d) None of the above.
36. Queue or Topic is referred in context of
a) Stateful Session Bean
b) Stateless Session bean
c) Message Driven Bean
d) None of the above.
37. A class that receives a notification if an
attribute is added, removed or replaced from a
session will implement which interface?
a) HttpSessionBindingListene r.
5. void prepareAndSend() {
6. String message = "Message";
SECTION-1: Core Java (60 Minutes) 7. // call send from here
1. Select the most appropriate option for the code 8. }
below. 9. public static void main(String[] args) {
1. abstract class A { 10. MethodCall mc = new MethodCall();
2. A() { 11. mc.prepareAndSend();
3. System.out.print("A"); 12. }
4. } 13. }
5. } a) super.send(message);
6. class B extends A { b) this.send(message);
7. B() { c) send();
8. System.out.print("B"); d) None of the above
9. super(); 4. Which of the following is NOT true regarding
10. } static methods?
11. public static void
main(String[] args) { a) A static method in a class is accessible from
12. new B(); within all the member methods of that class
13. } b) Abstract classes cannot have static methods
14. } c) static methods cannot use super keyword
a) AB d) If an access modifier is not specified on a
b) BA static method, it cannot be accessed from
c) Compilation error at line no. 2 5. import works on 5. import works on
d) Compilation error at line no. 9 outside the package of the defined class
2. Select the most appropriate option for the code 5. import works on
below. a) public resources
1. class StaticMethod { b) protected resources
2. static int sum(byte a, byte b) { c) private resources
3. System.out.print("byte sum() "); d) None of the above.
4. return a + b; 6. interface Z extends A, here A is
a) class
5. }
b) interface
6. static long sum(long a, long b) {
c) Function.
7. System.out.print("long sum() ");
d) None of the above.
8. return a + b;
7. printStackTrace method is present in
9. }
a) Throwable
10. static double sum(double a, double b) {
b) Exception
11. System.out.print("double sum() ");
c) Error
12. return a + b;
d) None of the above.
13. } 8. checked exceptions are
14. public static void main(String[] args) { a) runtime exceptions
15. System.out.println(sum(10, 5)); b) non runtime exceptions
16. } c) Both a and b.
17. } d) None of the above.
a) byte sum() 15 9. State which of the following statements are
b) long sum() 15 true
c) double sum() 15.0 I.An abstract class must have at least one
d) Compilation error at line no. 15 abstract method
3. Choose an appropriate option for the II.An abstract class can have 0 - n methods
following code that may be inserted at line no. 7 abstract but even if one method is declared as
in the code below. abstract the class must be declared abstract.
1. public class MethodCall { III.An abstract method can have a method body.
2. void send(String message) { IV.An abstract class can be instantiated.
3. System.out.println("sending " + message);
4. } a) I,II
b) II b) Foo f= (Delta)x;
c) II,III c) Foo f= (Alpha)x;
d) I, II, III d) Beta b = (Beta)(Alpha)x;
10. Can we declare variable inside a method as 17. A Java applet can communicate with other
final variable and can an abstract class may be Java applets by using
final? a) Appelt functions
a) Yes, Yes b) javascript functions
b) Yes, No c) java functions
c) No, Yes d) awt funcitons
d) No, No
11. Which is the implicit access modifier for an 18. Question: What will be the output of
interface method? following code?
a) private
b) default public class TestObjectType { public static void
c) public main(String s[]) { B b = new B(); A a1 = new
B(); A a2 = new A();
d) protected
System.out.print(b.getClass().getNa me());
12. Which option is true? System.out.print(a1.getClass().getNa me());
a) X extends Y is correct if and only if X is a System.out.println(a2.getClass().get
class and Y is an interface Name()); } } class A { } class B extends A { }
b) X extends Y is correct if and only if X is an a) A A B
interface and Y is a class b) A B A
c) X extends Y is correct if X and Y are either c) B B A
both classes or both interfaces d) compile time error
d) X extends Y is correct for all combinations of 19. Which method returns a Method object that
X and Y being classes and/or interfaces reflects the specified declared method of the
13. What is the output of following? Double d2 = class or interface represented by this Class
new Double("-5.5"); Double d3 = new Double("- object?
5.5"); System.out.println(d2==d3); a) java.lang.Class.getDecl aredMethod()
System.out.println(d2.equals(d3));
b) java.lang.Class.getMethod()
a) true true
c) java.lang.Class.getMethodNam es()
b) false false
d) it is not possible.
c) true false
20. Question: DatagramSocket allows a server to
d) false true accept ______________
14. Which of the following would compile a) UDP Packets
without error?
b) TCP connections
a) int a = Math.abs(-5);
c) FTP Connections
b) int b = Math.abs(5.0);
d) None of the above
c) int c = Math.abs(5.5F);
21. Which of the following is Application level
d) int d = Math.abs(5L);
protocol?
15. Which of the following wrapper classes can
a) FTP
not take a "String" in constructor?
b) HTTP
a) Boolean
c) JRMP
b) Integer
d) all of the above
c) Long
d) Character 22. Remote object must extend
16. Given: a) RMIObject
b) UnicastRemoteObject
10. interface Foo {} 11. class Alpha implements
c) Socket
Foo { } 12. class Beta extends Alpha {} 13. class
Delta extends Beta { b) Foo f= (Delta)x; b) Foo d) ServerSocket
f= (Delta)x; 14. public static void main( String[] 23. The default port no. for RMI is
args) { 15. Beta x = new Beta(); 16. // insert code a) 1080
here 17. } 18. } Which code, inserted at line 16, b) 7001
will cause a java.lang.ClassCastException? c) 1099
a) Alpha a = x; d) 8080
24. Select the wrong statement String s = "Dolly "; String t = s.concat("Hello, ");
a) business method in RMI should be declared as What characters will the object reference t
throws RMIException contain?
b) Argument of business method must be a) "Dolly Hello, "
serialized whereas return type need not be. b) "Hello, "
c) When client calls “lookup()”, he gets actual c) "Dolly "
remote object. d) none of the above
d) All of the above. 31. Which label name is illegal?
25. When is a singleton is not singleton in Java? a) here:
a) Many cases like Serialization, RMI, b) _there:
Classloader loading multiple instance etc. c) this:
b) when constructor is private d) that:
c) when it supplies same object 32. Given these class definitions:
d) Many cases like Serialization, RMI,
Classloader loading single instance etc. class Superclass { } class Subclass1 extends
26. To implement perfect singleton pattern we Superclass { } class Subclass2 extends
need to: Superclass { } and these objects: Superclass a =
a) Make Constructor private new Superclass(); Subclass1 b = new
b) Override the Object clone method to prevent Subclass1(); Subclass2 c = new Subclass2();
cloning which of the following explains the result of the
c) Make the Access method Synchronized to following statement?: b = (Subclass1)c;
prevent Thread Problems. a) Illegal at compile time
d) all of the above b) Legal at compile time but possibly illegal at
runtime
27. Adapter design pattern is also referred to as c) Definitely legal at runtime
a) Wrapper pattern when it is introduced by d) none of the above
composition of classes. 33. Which among the following collection
b) Adapter pattern when introduced by classes is best suited for implementing a stack
inheritance of classes without worrying about synchronization?
c) Wrapper pattern when it is introduced by a) Vector
composition of classes. b) TreeSet
d) Design pattern when it is introduced by c) TreeMap
composition of classes. d) ArrayList
28. ----------- in Java is powerful and useful,
when objects are needed to be mapped into 34. What will be the output of the following
tables in a database at runtime. program?
a) reflection
b) RMI class SetDemo { public static void main(String[]
c) Dynamic Method Dispatch args) { d) 3 d) 3 Set container = new HashSet();
container.add("apples");
d) Static Binding
container.add("mangoes"); container.add(new
29. What does the following code do (if String("apples")); container.add("mangoes");
anything)? drawLine(0, 10, 20, 30); container.add("oranges");
a) draw a line from x = 0, y = 20 to x = 10, y = system.out.println(container.size()); }
30 a) Prints the current capacity of the HashSet to
b) draw a line from x = 0, y = 10 to the contain elements
coordinates x = 20, y = 30 b) 5
c) draw the outline of a box whose left, top c) 4
corner is at 0, 10 and that is 20 pixels wide and d) 3
30 pixels high
35. How will you sort an array of int?
d) nothing—this code does not compile because
a) Use Arrays.sort()
it does not provide the correct number of
arguments b) Use Collections.sort()
30. After these two lines of code: c) By implementing Comparator
d) By implementing Comparable
36. Following collection class not only associate
key with value, but also order the keys according
to the natural ordering of its elements?
a) HashSet
b) HashMap
c) TreeMap
d) SortedSet
37. By default renderer used in the table is
a) textbox
b) label
c) button
d) text.
38. MVC can be used in
a) Presentation layer
b) Service layer
c) DAO layer
d) none of the above.
39. When the browser gets closed the method
which applet will call.
a) destroy
b) close
c) remove
d) exit.
40. Applets by default if they access file system
will result in
a) Exception
b) Error
c) Compilation error.
d) None of the above.
removed"); } } Which of the following statements
SECTION-2: Enterprise Java (J2EE) (60 about the above class is correct?
Minutes) a) This class will compile as is.
1. DriverManager is used to get the object? b) This class will compile only if the
a) Connection attributeReplaced() method is added to it.
b) Statement c) This class will compile only if the
c) Query attributeUpdated() method is added to it.
d) ResultSet d) This class will compile only if the
2. How to look for another row from ResultSet in attributeChanged() method is added to it
JDBC? 10. Consider the following servlet code:
a) Using rs.hasNext()
b) Using rs.next() public class TestServlet extends HttpServlet
c) using rs.getRow() { private static StringBuffer staticVar = new
StringBuffer(); private StringBuffer instanceVar
d) using rs.getNextRow()
= new StringBuffer(); public void
3. How to make auto commit disable to achieve doGet(HttpServletRequest req,
transaction in JDBC? HttpServletResponse res) a) staticVar a)
a) Connection.setCommit(false) staticVar { private StringBuffer localVar = new
b) connection.setCommitDisable () StringBuffer(); } } Which of the variables used
c) connection.setAutoCommit(fa lse) in the above servlet reference objects is thread
d) connection.commit(false) safe?
4. Which package contains the JDBC classes? a) staticVar
a) java.jdbc.* b) instanceVar
b) java.sql.* c) localVar
c) java.lang.* d) None
d) java.io.* 11. Which of the following lines would initialize
5. To read cookies we can use the out variable for sending a Microsoft Word
a) HttpServletRequest file to the browser?
b) HttpSErvletResponse a) PrintWriter out =
c) Cookies response.getServletOutput() ;
d) None of the above. b) PrintWriter out = response.getPrintWriter();
6. To get a session object we need to use c) OutputStream out = response.getWriter();
a) HttpServletRequest. d) OutputStream out =
b) HttpServletResponse response.getOuputStream();
c) HttpSession 12. Consider the following code:
d) None of the above.
public void doGet(HttpServletRequest req,
7. To do client side presentation we need to use
HttpServletResponse res) throws IOException
a) html { if(req.getParameter("switch") == null) { //1 }
b) jsp else { //other code } } Which of the following
c) servlet lines can be inserted at //1 so that the request is
d) None of the above. redirected to the collectinfo.html page?
8. When all browsers close what happens in the a) req.sendRedirect("collectinf o.html");
jsp? b) req.redirect("collectinfo.ht ml");
a) jsp destroy will get called c) res.direct("collectinfo.html" );
b) jsp init will get called d) res.sendRedirect("collectinf o.html");
c) jsp service 13. After EntityManager is closed, entity is in a
__________ state.
d) None of the above.
a) dead
9. Consider the following class: b) detached
c) managed
import javax.servlet.*; public class MyListener
d) persistent
implements ServletContextAttributeListener
14. In case of EJB, Stub is not required for the
{ public void
attributeAdded(ServletContextAttribu teEvent following view.
scab) { System.out.println("attribute added"); } a) outer view
public void attributeRemoved(ServletContextAttr b) inner view
ibuteEvent scab) { System.out.println("attribute c) remote view
d) local view c) HTTP requests management
15. Which method inside MDB is called once the d) RMI services
message arrives? 22. Which method of the jpa entity manager
a) showMessage would you use to force synchronizing the
b) onMessage persistence context from the database?
c) doMessage a) synchronize()
d) none of these b) flush()
16. Which statement is correct from the
c) refresh()
following?
a) In case of Point – to – Point domain model a d) persist()
message is passed to Topic 23. Which of the following is NOT a JMS
b) From clause of JPQL uses table name and not message valid body format?
the entity name. a) ByteMessage
c) No need to lookup JNDI in case of local view b) ObjectMessage
of EJB. c) CharMessage
d) in case of JPQL Named parameters and d) TextMessage
positional parameters can not be mixed in a
single query 24. What are the components of a JMS
17. Which of the following is NOT a step in the messaging application?
Hibernate communication with RDBMS? a) a Queue
1) Create HQL Query b) a Message Producer
2) Execute query to get list containing Java c) a WebService end point
objects
d) All of the Above.
3) Create session from configuration object
a) 2, 4, 5 a) 2, 4, 5 25. JSP file are interpreted ____________
4) Load the Hibernate configuration file and e) a) each instance
create configuration object f) once
5) Get one session from the session factory g) every request
a) 2, 4, 5 h) none of the above
b) 2, 3, 4 26. The default scripting language for JSP is
c) 1, 2, 4, 5 ________
d) 1, 3, 4 a) java script
18. __________ Objects can be passed across b) Vbscript
layers all the way up to the presentation layer c) Java
without having to use any DTOs (Data Transfer d) Both a & c
Objects). You can later re-attach them to another 27. The signatures of the ejbCreate methods
session must meet the following requirement(s)
a) Detached a) The access return type must be void
b) Persistent b) The modifier cannot be static or final
c) Removed c) Arguments must be legal types for java RMI
d) Transient d) All of the above
19. Struts framework is based on 28. An Enterprise JavaBeans can be deployed in
a) Servlet, JSP and Java _______
b) Servlet, HTML and Java a) J2EE server
c) Servlet, JSP, XML and Java b) Weblogic
d) Applet, XML and Java c) Websphere
20. Which of the following methods is d) All of the above
overridden by Action class? 29. 29. In the following which is the false
a) service () statement i.e which does not follow the rules of
b) execute () the Hibernate persistent class?
a) class must have overloaded constructor.
c) run ()
b) class must have an ID.
d) destroy ()
c) class attribute should be declared private and
21. What services EJB containers provide to
getter setter method
Session beans?
a) HQL query type a) HQL query type
a) Caching and pooling defined as per Java Bean rule.
b) EJB life cycle management
d) class must not be final. d) It will only print Hello.
30. In the following which query type is 39. What will be the output of the following
supported by Hibernate? code? (Select one)
a) HQL query type
b) SQL query type <html><body> The value is <%=""%>
c) Criteria query type </body></html>
d) All of the above a) Compilation error
31. What is Session in hibernate? b) Runtime error
a) Session used to get connection to the database. c) The value is
b) Session is the unit of work and perform read, d) The value is null
write, update operation on the persistent 40. Which deployment descriptor element
instance. contains the <exception-type> element?
a) <error>
c) Session is the first level cache and all request
b) <error-mapping>
must pass through this.
c) <error-page>
d) All of the above
d) <exception-mapping>
32. What is secondary level cache in hibernate?
a) Hibernate Session-factory
b) Hibernate Session
c) Hibernate Util
d) Hibernate Query
33. EJB is used in
a) Presentation Layer
b) SErvice Layer
c) DAO layer
d) none of the above.
34. which of the following can do business logic
a) Sesion Bean
b) Message driven Bean
c) both a and b.
d) none of the above.
35. Stateful and Stateless is referred in context of
a) Session Bean
b) Message Driven Bean
c) JPA
d) None of the above.
36. Queue or Topic is referred in context of
a) Stateful Session Bean
b) Stateless Session bean
c) Message Driven Bean
d) None of the above.
37. A class that receives a notification if an
attribute is added, removed or replaced from a
session will implement which interface?
a) HttpSessionBindingListene r.
b) HttpSessionAttributeListen er
c) HttpSessionListener
d) HttpSessionActivationListe ner
38. Select the correct statement about the
following code. (Select one)

<%@ page language="java" %> <html><body>


<% response.getOutputStream().print ("Hello ");
out.print("World"); %> </body></html>
a) It will print Hello World in the output.
b) It will generate compile-time errors.
c) It will throw runtime exceptions.
SECTION-1: Microsoft .NET (MS.NET) (60 c) WCF
Minutes) d) WF
1. Which of the following is an example of 10. What is not true about WCF?
unmanaged code? a) Support Security
a) .Net EXE b) Support many Protocols
b) .Net DLL c) Support sessions
c) unsafe code d) Support only .net client
d) ActiveX DLL’s 11. Which is not a feature of C# Language?
2. What allows code from different .net a) C# is case sensitive
programming languages like C# and VB.Net to b) C# gets converted into MSIL after
use the same data type Compilation
a) CTS c) C# language can be used for developing any
b) CLS type of application
c) JIT d) C# is a native language
d) MSIL 12. What is not true statement about ReadOnly
3. Which class in the System.Reflection fields in C#
namespace allows us to examine a struct using a) Readonly fields are runtime constants
Reflection? b) ReadOnly fields values can be reassigned in
a) .ClassInfo constructors
b) Type c) ReadOnly fields are static, can be access by
c) StructInfo class name only
d) MemberInfo d) Readonly fields value cannot be changed
4. Which keyword is used to create a variable inside functions
that would infer the data type based on values 13. You need to write a multicast delegate that
assigned to it at compile time itself? accepts a DateTime argument. Which code
a) object segment should you use?
b) Type b) public delegate bool PowerDeviceOn(object
c) var sender, EventsArgs autoPowerOff); b) public
d) Expando delegate bool PowerDeviceOn(object sender,
5. Which are the libraries that are part of WPF EventsArgs autoPowerOff);
a) Presentation core a) public delegate int PowerDeviceOn(bool
result,DateTime autoPowerOff);
b) Presentation Framework
b) public delegate bool PowerDeviceOn(object
c) Milcore
sender, EventsArgs autoPowerOff);
d) All the above
c) public delegate void
6. Binding Element in WCF comprises PowerDeviceOn(DataTime autoPowerOff);
a) Protocol d) public delegate bool
b) Encoder PowerDeviceOn(DataTime autoPowerOff);
c) Transport 14. What are delegates?
d) All the above a) Value Pointer
7. Which of the following is a value types? b) Function Pointer
a) struct c) Pass By Reference
b) Array d) Pass By Value
c) delegate 15. What is Boxing?
d) String a) The conversion of a value type to an object
8. Which of the following is the root of the .NET instance
type hierarchy? b) The conversion of an object instance to a
a) System.Object value type.
b) System.Type c) The conversion of a value type to reference
c) System.Base type.
d) System.Parent d) The conversion of a reference type to a value
9. Which type of application is used for type
developing animated applications? 16. The ____ object contains any additional
a) Windows App information that might be associated with the
b) WPF event.
a) System.Event a) 1, 2, 3
b) System.EventArgs b) 2, 4, 5
c) System.EventObject c) 1, 3, 5
d) System.EventObj d) 1, 2
17. Which protocol is used by web services? b) No for security reasons b) No for security
a) RMI reasons
b) SOAP 23. Application Domain is useful when you need
c) TCP/IP to unload loaded assembly.
d) SMTP a) Yes Always
18. Which property of the AdRotator control b) No for security reasons
points to the file with the information required to c) Only if assembly is in current directory
work? d) Only if assembly is in GAC
a) Admethods 24. Which of the following components of
b) adcontrol the .NET framework provide an extensible set of
c) advertisementfile classes that can be used by any .NET compliant
programming language?
d) adlist.xml
a) .NET class libraries
19. Which class is used to execute the SQL
statement or stored procedure against a data b) Common Language Runtime
source? c) Common Language Infrastructure
a) Data adapter class d) Component Object Model
b) connection class 25. If we need to create an instance of TextBox
c) Dataset class Server control dynamically in your code, then in
which page event would you create the server
d) Command class
control to ensure that their view state is properly
20. What is used to fetch values from the data reconnected to the control on PostBack?
source to the DataSet and also update the data
a) Preinit
source with the values in the DataSet?
b) init
a) DataReader
c) Load
b) DataAdapter
d) PreRender
c) DataManager
26. The automatic binding of page events based
d) None of the above.
on the method naming convention is controlled
21. Which of the following benefits do we get on by a page property named ____________. If set
running managed code under CLR? to true, ASP.NET performs automatic looking up
1.Type safety of the code running under CLR is and binding of events.
assured. a) AutoEventWireup
2.It is ensured that an application would not b) AutoEvent
access the memory that it is not authorized to
c) EventWireup
access.
d) AutoWireup
3.It launches separate process for every
application running under it. 27. You need to validate an employee id entered
by user. All the valid employee ids already exist
4.The resources are Garbage collected.
in database table. How can you validate this
a) Only 1 and 2 input from user?
b) Only 2, 3 and 4 a) provide a RegularExpressionValidato
c) Only 1, 2 and 4 r and set the validationExpression property to
d) All of the above /DbLookup(code).
22. Which of the following statements are b) Provide a RangeValidator and set MinValue
correct about a .NET Assembly? property to DbLookup(code) and set the
1.It is the smallest deployable unit. MaxValue Property to DbLookup(code)
2.Each assembly has only one entry point - c) Provide CustomValidator with serverside code
Main(), WinMain() or DLLMain(. to search the database for code.
3.An assembly can be a Shared assembly or a d) Provide a CompareValidator and set compare
Private assembly. expression to the name of a server side function
4.An assembly can contain only code and data. that performs a database lookup of the code
5.An assembly is always in the form of an EXE 28. Html Server Controls are defined
file. in_________________namespace.
a) System.Web.UI.HTML Controls d) Browser
b) System.Web.UI.HTML Control
c) System.Web.HTML Controls 36. In which tool can you create a webpart?
d) System.Web.UI.HTML a) Visual Studio
29. When does CCW come into play? b) Sharepoint Designer
a) When .Net Client calls a COM Object c) MS Office
b) When COM Client calls a .Net Object d) Browser
c) When .Net Client calls a .Net Object 37. If Silverlight has to make a cross domain call
d) When COM Client calls a COM Object first it checks for existence of a file
30. When using Remoting it is compulsory to a) ClientAccessPolicy.xml
inherit the remoting class with b) CrossDomain.xml
________________ c) CosssFile.xml
a) MarshallByRefObject d) DomainFile.xml
b) MarshallByRefClass 38. The file that wraps all Silverlight resources
c) Marshall in an archive format has extension
d) MarshallByRef a) .zip
b) .xap
31. When using WebServices, If one wants to c) .res
expose a method to the outside application then d) .mod
one has add the __________ attribute 39. The entity in sharepoint that enable end users
a) [WebMethods] to modify the content, appearance, and behavior
b) [WebService] of Web pages directly from a browser.
a) a) a) Webparts
c) [WebMethod] b) Lists
d) [WebGet] c) Pages
d) Sites
32. When using a User Defined Class in WCF 40. What in Microsoft Office SharePoint
one has to mark the class with __________ technology makes it simple for us to use, share,
attribute. secure, and manage Microsoft Office Excel
a) [DataMember] workbooks?
b) [DataContract] a) SpreadSheet Services
c) [ServiceContract] b) Excel Services
d) [OperationContract] c) Workbook Services
d) Portal Services
33. Which of the following allows you to see
summarized performance statistics?
a) Excel Services Web part
b) Infopath forms Web part
c) Business data catalog Web part
d) KPI Web part

34. Which feature enables SharePoint to display


data from various back-end servers into a
SharePoint page?
a) Excel Services
b) Infopath forms
c) Business data catalog
d) KPI

35. Which tool allows us to customize our


Sharepoint Site’s look and feel?
a) Visual Studio
b) Sharepoint Designer
c) MS Office
SECTION-1: Operating System Concepts (60 c) Pipes forbid random accessing. while
Minutes) regular files do allow this
1. Function execl – d) Both (b) and (c)
a) Runs the child process 11. Choose the correct statement(s).
b) Replaces current process image with a new a) Any process has an associated owner ID and
process image group ID
c) Useful for execution of Linux commands b) Effective ID defines who you are for the
d) All of the above duration of a process
2. PID is returned by c) Real ID defines who you are for the duration
a) execl of a process
b) wait d) Both (a) & (b)
c) fork
d) none of the above 12. Which of the following shell script's looping
3. System call features does not recognize the break command?
a) is a simple function call. a) while
b) is a call to functions provided by OS to b) until
work with the hardware. c) for
c) is call to OS. d) None of the above
d) is an interrupt. 13. Which command is used to display the
4. System calls are implemented in… device name of the terminal you are using?
a) User mode a) who
b) Kernel mode b) ls
c) Any of them c) tty
d) None of the above d) sty
5. Interrupt handlers are managed in : 14. Select appropriate option for Short term
a) system call table scheduler
b) interrupt table a) Switching the CPU to another process
c) system call interface layer b) Moving the process in and out of memory
d) none of the above c) Decides which of the ready process to be
6. adding a system call to Linux kernel : schedule next
a) does not require recompiling the kernel d) None of the Above
b) does require recompiling the kernel 15. When processes enter the system they are put
c) does require a module in to a ____________
a) Ready Queue
d) none of the above
7. Process entity is : b) Process Queue
a) an active instance of an application c) Job Queue
b) a component of the operating system d) System Queue
c) an utility of the operating system 16. The short term scheduler is also known as
____________
d) all of the above
a) CPU Scheduler. – short term
8. FAIR-SHARE scheduling is :
a) a time-slicing scheduler in Linux b) Job Scheduler -- Long term
b) a time-sharing scheduler in Linux c) File Scheduler
c) a real-time scheduler in Linux d) None
17. A Virtual Machine system can have -
d) none of the above
a) Many instances of single Operating system
9. If 7 terminals are currently logged on. then the
running on it.
command date ; who | wc –l, displays
a) date followed by 7 b) Many instances of different Operating system
running on it.
b) date followed by 8
c) One Host OS and many Guest OS running on
c) date followed by 1
it.
d) an error message
d) All of the above
10. The difference between a pipe and a regular
18. Which of the following feature is impossible
file is that
to virtualize?
a) Unlike a regular file, pipe is not a file.
a) Real time behavior
b) The data in a pipe is transient. unlike the b) Memory Sharing
contents of a regular file c) Storage virtualization
d) Network device sharing 27. A page fault
19. What is use of Multiprocessor CPU a) is an error in a specific page
Scheduling – b) occurs when a program accesses a page of
a) To support multiprogramming. memory
b) To support parallel processing. c) is an access to a page not currently in
c) Both A and B memory
d) None of the above d) is a reference to a page belonging to another
20. Which of the following is not an example of program
a processor-bound job?
a) Statistical analysis of student performance 28. What problem is solved by Dijkstra's
b) Iterative calculation of a square root banker's algorithm?
c) Backing up a hard drive to tape a) mutual exclusion
d) Having a program calculate the first 20 prime b) deadlock recovery
numbers. c) deadlock avoidance
21. What is meaning of the command: tail +5 d) cache coherence
filename 29. The signal the keyboard sends to the
a) Print last 5 lines of given file computer is a special kind of message called
b) Print first 5 lines of given file ___.
c) Print first and last 5 lines of given file a) keyboard request
d) None of these b) keyboard controller
22. What is use of PIPE in Linux command? c) interrupt controller
a) Sending output of a process to a file d) interrupt request
b) Sending content of a file to the process 30. Select appropriate option for Context Switch
c) Sending output of a process to another a) Moving the process in and out of memory
process b) Decides which of the ready process to be
d) Copying contents of a file to another file schedule next
23. What is use of 2> operator? c) Allows only a limited number of process in
a) Input redirection ready queue to complete for CPU
b) Output redirection d) Switching the CPU to another process
c) Error redirection 31. Select appropriate option for Swapping
d) File redirection a) Moving the process in and out of memory
24. What is (standard) port number is used for b) Allows only a limited number of process in
ssh? ready queue to complete for CPU
a) 30 c) Decides which of the ready process to be
b) 80 schedule next
c) 44 d) Switching the CPU to another process
a) executes first the job that last entered the 32. A null variable can be created using
queue a) executes first the job that last entered a) a=
the queue b) a=’’
d) 22 c) a=””
25. The FIFO algorithm d) All of the above
a) executes first the job that last entered the 33. What will be the output of the below
queue program
b) executes first the job that first entered the
queue #include<stdio.h> #include<sys/types.h> int
c) execute first the job that has been in the queue main(void){ pid_tpid; pid = fork(); switch(pid)
the longest { case -1: printf(“Error in forking\n”); exit(1);
d) executes first the job with the least processor case 0: printf(“Child executing - %d\n”, pid);
needs exit(2); default: printf(“Parent executing\n”); }
26. The initial value of the semaphore that exit(0);}
allows only one of the many processes to enter a) Child executing - 0
their critical sections, is b) Parent executing
a) 8 c) Child executing - 1234
b) 1
c) 16 Parent executing
d) 0 d) Child executing - 1234
34. What will be the output of the below
program?
c) 2, 20 3, 21 c) 2, 20 3, 21 #include<stdio.h>
#include<sys/types.h> intgv = 2; void main()
{ int lv = 20; pid_tpid = fork(); switch(pid){ case
-1 : printf(“Error in creating process”); break;
case 0: printf(“%d, %d \t”, gv, lv); gv++; lv++;
break; default: prinf(%d,%d”, gv, lv); } exit(0); }
a) 2, 20 3, 20
b) 2, 20 2, 20
c) 2, 20 3, 21
d) 2,20 2, 21
35. SIGINT is a signal that indicates
a) Forced process termination
b) Ctrl+ C
c) Ctrl+X
d) Hang up the terminal or process
36. What is the range of a counting semaphore?
a) Can range between 0 and 1
b) Can range between -1 and 1
c) Can range between 0 and any positive value
d) None of the above
37. A binary semaphore has the following :
a) counter
b) state
c) ownership information
d) all of the above
38. A mutex has the following :
a) counter
b) state
c) ownership information
d) b and c
39. A named pipe can be used between :
a) related processes
b) unrelated processes
c) a or b
d) none of the above
40. A re-entrant / thread safe API may be
concurrently used :
a) in a single threaded process
b) in a multi-threaded process
c) a or b
d) none of the above
SECTION-2: Software Engineering and c) Class
Project management (SEPM (60 Min) d) Relationship
1. The risk factor is considered in? 10. Review is what kind of Testing?
a) Spiral Model a) Black Box Testing
b) Waterfall Model b) Static Testing
c) Prototyping Model c) Dynamic Testing
d) Iterative enhancement Model d) White Box Testing
2. The prototyping model of the software 11. Equivalence Partitioning is a test case
development is? generation technique for which kind of Testing
a) A reasonable approach when requirements are Technique,
well defined. a) Static Testing
b) A useful approach when a customer cannot b) White Box Testing
define requirements clearly. c) Black Box Testing
c) The best approach to use for projects with d) Red Box Testing
large development teams. 12. System Testing is done,
d) A risky model that rarely produces a a) At Customer Site
meaningful product. b) At Development Site
3. The system specification describes c) All of the above
---------------? d) None of the Above
a) Function, performance and constraints of a 13. Spiral model provides
computer-based system a) Potential for rapid development of incremental
b) Implementation of each allocated system version of software
c) Element software architecture c) The best approach to use for projects with
d) Time required for system simulation large development teams c) The best approach to
4. Which is not a step of requirement use for projects with large development teams
engineering? b) A good approach when a working program is
a) Requirements elicitation required quickly
b) Requirements analysis c) The best approach to use for projects with
c) Requirements design large development teams
d) Requirements documentation d) An old fashioned model that cannot be used in
5. Unit testing tool example is a modern context
a) Junit 14. COCOMO model does not define the
b) CUnit following classes
c) JSUnit a) Organic mode
d) all the above. b) Semi-detached mode
6. Boundary value test case is decided in c) Embedded mode
a) Black box testing d) Detached mode
b) white box testing 15. What are the three framework activities for
c) System testing the Adaptive Software Development (ASD)
d) none of the above process model?
7. for small companies and individuals which a) analysis, design, coding
quality standard would you recommend b) feasibility study, functional model iteration,
a) six sigma implementation
b) ISO 9001 c) requirements gathering, adaptive cycle
c) PSP planning, iterative development
d) none of the above d) speculation, collaboration, learning
8. Quality Assurance is done during 16. The incremental model of software
a) requirements development is
b) Design a) A reasonable approach when requirements are
well defined
c) Coding
b) A good approach when a working core
d) All the above.
product is required quickly.
9. ________ is an entity that is external to the
system and directly interacts with the system, c) The best approach to use for projects with
deriving some benefits from the interaction. large development teams
a) Actor d) A revolutionary model that is not used for
b) Use case commercial products
17. Main activities in Project management are : 25. Ability to deal with exceptional conditions
a) Planning, scheduling, estimating and tracking e.g. invalid input, improper handling, power
b) Planning , scheduling , resource management, failure, disk crash etc.
bug control a) Effeciency
c) Planning, scheduling , customer satisfaction, b) Robustness
vendor management c) Reliability
d) Planning, scheduling , communication d) Correctness
management, configuration management 26. E-R diagrams are used in
18. Integration of project management with the a) Database design
organization takes place with the - b) Data Dictionary compilation
a) Master budget c) Architechtural design
b) Strategy plan d) Functional Design
c) Process of managing actual projects 27. Arrange the following activities in Risk
d) Both b and c are correct Assesment in the correct sequence 1.
19. Scheduling produces Prioritization 2. Identification 3. Analysis
a) Work Breakdown Structure a) 2,1,3
b) Activity bar chart b) 2,3,1
c) Cost/benefit analysis c) 1,2,3
d) SRS d) 3,1,2
20. Select the statement which is false about 28. Example of Software Configuration Items
Project Monitoring And Control (PMC) (SCI) is
a) PMC is a part of Project Management a) SRS
b) Weekly status reports is an input for PMC b) Code
c) Monitoring Risk list is a part of PMC c) User manual
d) Configuration Management Plan creation d) all of the above
21. Which one of the following is FALSE 29. Quality costs may divide in to costs
statement? associated with?
a) Gantt charts are often used for displaying the a) Prevention, appraisal and failure
project schedule b) People, process and product
b) Gantt chart shows both planned and actual c) Customers , developers and maintenance
schedule information d) All of the above
c) CPM is used for finding total project cost 30. Which of the following are objectives for
d) Critical path is the longest path through the formal technical reviews?
network diagram a) allow senior members to correct errors
22. In Software project management, 4 Ps have b) assess programmer productivity
to be managed in following order - c) determining who introduced an error in to
a) Project, People, Product, Process program
d) Product, People, Process, Problem d) Product, d) Uncover the errors in the software work
People, Process, Problem products.
b) Process, Problems, People, Product 31. The tool for computing critical path and
c) People, Product, Process, Project project completion times from activity networks
d) Product, People, Process, Problem a) CASE
23. One of the limitations of FP analysis is b) PERT
a) Evaluation effort is small c) FPA
b) Facilitates verification d) DRE
c) Does not provide phase-wise break up 32. Which of the following is not considered a
d) None of the above stakeholder in the software process?
24. Which one of the following is true? a) Customers
a) Deliverables are usually milestones but b) End users
milestones need not be deliverables c) Project managers
b) All milestones are deliverables d) Sales people
c) Deliverables & Milestones are always 33. Key principles in software engineering are
deliverables a) Abstraction
d) None of the above b) decomposition
c) both a and b.
d) None of the above.
34. Exploratory programming means.
a) we following software engineering principles
b) Keep coding and fixing.
c) done for critical programs
d) None of the above.
c) Algebraic specifications c) Algebraic
specifications
35. Which of the following is not done as part of
requirements?
a) Decision Tables
b) Formal Techniques
c) Algebraic specifications
d) None of the above.
36. External interfaces are part of
a) Functional requirement
b) nonfunctional requirement
c) Both a and b
d) None of the above.
37. Which SDLC Model is best suited for doing
'Proof of Concept' when technologies are new
and we are not sure whether they work well with
each other?
a) Waterfall Model
b) Incremental Model
c) Prototype Model
d) Spiral Model
38. While gathering requirements, Progressive
elaboration is to be done in which sequence?
a) Needs, Software Requirements, Features
b) Features, Needs, Software Requirements
c) Needs, Features, Software Requirements
d) None of the above
39. WBS is,
a) Describes Stakeholder needs, High-level
product description, Project Justification
b) Describes Project Objectives, Product
Requirements, Deliverables, Acceptance criteria
c) Starts with Phase level Deliverables;
decomposes to the work package level
d) All of the above

40. In case of Bank, what will be the relationship


between "Closing of Account" use case and
"Withdrawal" Use case?
a) Uses
b) Includes
c) Extends
d) None of the above
SECTION-2: Web Programming and XML 10. What is the correct syntax to retrieve the
(60 Minutes) parameter with name "user" passed by get
1. What is the correct HTML for making a drop- method?
down list? a) $user=$GET("user");
a) <input type="dropdown" /> b) $user=$GET=>"user";
b) <input type="list" /> c) $user=$REQUEST["user"];
c) <select> </select> d) $user=$_GET["user"];
d) <list></list> 11. What is the correct syntax to create array in
2. How can you add a comment in a JavaScript?? PHP?
a) <!--This is a comment--> a) $arr=new Array(100,200,300);
b) "This is a comment " b) $arr=array("AMOL","SAC HIN","RAM")
c) // This is a comment c) $arr=["AMOL","RAM","S ACHIN"];
d) <!-- This is a comment --> d) $arr=new Array(3);
3. Where is the correct place to insert a 12. Which function is used to connect to mysql
JavaScript? database in PHP?
a) The <head> section only a) connect()
b) The <body> section b) connect_mysql()
c) Both the <head> section and the body section c) mysql_connect()
are correct d) mysqlquery()
d) The <Title> Section 13. Page 1 has this link:
4. What is the correct syntax for referring to an
external script called "xxx.js"? <a href="page2.asp? color=green">Go</a> How
a) <script type="text/javascript" name="xxx.js"> can page2.asp get the "color" parameter? b)
b) <script type="text/javascript” href="xxx.js"> Response.QueryString("col or") b)
c) <script type="text/javascript” src="xxx.js"> Response.QueryString("col or")
d) <link type=”text/javascript” src="xxx.js"> a) Get("color")
5. var x= [] ; means in javascript we created b) Response.QueryString("col or")
a) array c) Request.QueryString("color ")
b) object d) Response.Parameter("color ")
c) function 14. What does XML stand for?
d) None of the above. a) eXtra Modern Link
6. split function is used on b) Example Markup Language
a) array c) eXtensible Markup Language
b) string d) X-Markup Language
c) both a and b. 15. There is a way of describing XML data,
how?
d) None of the above.
a) XML uses a DTD to describe the data
7. window.onload means when
b) XML uses a description node to describe data
a) when window is loaded
c) XML uses XSL to describe data
b) when all the tags in the page is loaded
d) XSL uses XML to describe data
c) when all the tags and images in the page is
loaded 16. What is the correct syntax of the declaration
which defines the XML version?
d) none of the above.
a) <xml version="1.0" />
8. document.getElementById can be used after
b) <?xml version="1.0"?>
a) onload
c) <?xml version="1.0" />
b) onclick
d) <?xml version="1.0" >
c) onBlur
17. Which of the following XML documents are
d) none of the above.
well-formed?
9. All variables in PHP start with which symbol?
a) <rootElement>first text
a) $
b) ! <childElement>second text </childElement>
c) ? </rootElement>
d) & b) <rootElement>first text </rootElement>

<childElement> second text </childElement>


c) <rootElement>first text a) Entity
b) Entity Reference
<childElement> second text </rootElement> c) Comment Reference
</childElement> d) Comment Data
d) </rootElement>first text 26. read only Attribute of the document interface
in DOM is/are
</childElement>second text <rootElement>
18. How can we make attributes have multiple (i) doctype (ii) implementation (iii)
values?: documentElement
a) <myElement myAttribute="value1 value2"/> a) (i) only
b) <myElement myAttribute="value1"
b) (ii) only
myAttribute="value2"/>
c) <myElement myAttribute="value1, value2"/> c) (ii),(iii) only
d) attributes cannot have multiple values d) all
19. __________ is used to declare a default in a
DTD. 27. XSLT processors accept as input:
a) #prefix a) an XML conforming document file and an
b) #infix XSLT specification file
c) #FIXED b) only an XML document
d) #URN c) only an XSLT specification
20. Which of the following entity refer to data d) either an XML document or an XSLT
that an XML processor does not have to parse? specification
a) Unparsed Entity 28. In XSLT style sheet we have syntax to match
b) Predefined Entity elements with id as (if id is “ change” )
c) Parameter Entity a) <xsl:template match=” id(„change‟)” >
d) None of the above b) <xsl:template match=” (change)”>
21. Which of the following statements is true?
c) <xsl:template match=” change”>
a. AJAX stands for active java app xml b. d) <xsl:template match-id=”Change”>
AJAX- Asynchronous JavaScript and xml c. 29. A ________ is anything that can cause harm.
AJAX is totally new technology a) Vulnerability
a) a is true b) Phish
b) b is true c) Threat
c) c is true d) spoof
d) none 30. A ________ is a small program embedded
22. JASON stands for inside of a GIF image.
a) Javascript Object Notation
a) web bug b) cookie c) spyware application d)
b) Java Object nature spam
c) Java Object Notation 31. A hacker contacts you on phone or email and
d) None attempts to acquire your password.
23. How will you send data to server using post a) spoofing
method in AJAX? b) phishing
a) Xmlhttprequestobject.send( "key”,value) c) spamming
b) Xmlhttprequestobject.open( "a.php? d) bugging
key=”+value) 32. The phrase _____ describes viruses, worms,
c) Xmlhttprequestobject.go("a .php? Trojan horse attack applets, and attack scripts.
key=”+value) a) malware
d) None b) spam
b) onchangestate b) onchangestate c) phish
24. Which event is fired in AJAX to know the
d) virus
status of server response?
33. How do we put a message in the browser‟s
a) onreatdysatetchange
status bar?
b) onchangestate
a) statusbar = “put your message here”
c) onsrevetsent
b) window.status = “put your message here”
d) none
c) status(“put your message here”)
25. The XML DOM object is
d) window.status(“put your message here”)
34. The _______________ form element allows
you to select only one option from a group.
a) radio
b) Radiobutton
c) select
d) checkbox
35. To display a frame inside a <BODY> we use
__________ tag

a) <SetFrame> b) <Frame> c) <IFrame> d)


<FrameSet>
36. In the code below 10 is in

<IMG SRC = A.jpg border =10> a) Pixels b)


Cms c) Inches d) Number
37. When a web application exposes an internal
implementation object to the user it is called as
_________.
a) SQL Injection
38. The art of making a request on the user's
behalf is known as _________ 38. The art of
making a request on the user's behalf is known as
_________
b) Insecure Direct Object Reference
c) LDAP Injection
d) None Of the above
38. The art of making a request on the user's
behalf is known as _________
a) SQL Injection
b) Insecure Direct Object Reference
c) Cross-Site Request Forgery
d) None Of the above
39. ___________ provides a way of indicating
that data associated with a transaction is
corrupted
a) Data Poisoning
b) Insecure Direct Object Reference
c) Cross-Site Request Forgery
d) SQL Injection
40. The website for a company is hosted on a
_______ .
a) web client.
b) web infrastructure.
c) web server
d) None of the above

You might also like