Gate MCQ
Gate MCQ
6. Which of these commands do we use for listing the files, namely, chap01, chap02, and chap03?
a. Is – x chap0[124]
b. Is chap*
c. Is chap0[124]
d. Is chap[124]
Answer: (d) Is chap[124]
7. Which of these commands do we use for the sorting of data lines in a file in alphabetical order?
a. st
b. sort
c. sort – r
d. sh
Answer: (b) sort
8. By default, which of these ports does squid listen to?
a. 3128
b. 7334
c. 2314
d. 4322
Answer: (a) 3128
9. Which of these commands do we use in the NFS servers so as to see the servers that are
running?
a. serverinfo
b. rpcinfo
c. infserv
d. NFSinfo
Answer: (b) rpcinfo
10. The token management and dialogue control in the OSI network architecture are responsible for
the:
a. transport layer
b. data link layer
c. session layer
d. network layer
Answer: (d) network layer
11. Out of the following NIS clients, which one would find the information about any NIS domain as
well as server and then store it?
a. yppoll
b. ypcat
c. ypbind
d. ypwhich
Answer: (c) ypbind
12. Which of these commands do we use for just counting the total number of lines that a file
contains?
a. wc – l
b. wc – c
c. wc – w
d. wc – r
Answer: (a) wc – l
13. Which of these types of installations do need a special boot disk?
a. PCMCIA
b. NFS
c. FTP
d. All of the above
Answer: (d) All of the above
14. Which of these do NOT constitute as a default part of the email system of Red Hat Linux?
a. The MTA
b. Pine
c. Procmail
d. The MUA
Answer: (b) Pine
15. Which of these commands do we use for forcing all the buffers to the disk?
a. flush
b. edbuff
c. sync
d. save
Answer: (c) sync
12. The Hacker who did break the SIPRNET system is ___________.
a. Kevin Poulsen
b. John von Neumann
c. Kevin Mitnick
d. John Draper
Answer: (a) Kevin Poulsen
13. Using the cipher algorithm, which of these types of text would be transformed?
a. Plain text
b. Scalar text
c. Complex text
d. Transformed text
Answer: (a) Plain text
14. Which of the following malware types does not clone or replicate itself through infection?
a. Viruses
b. Worms
c. Trojans
d. Rootkits
Answer: (c) Trojans
15. The DNS would translate any Domain name into ___________.
a. IP
b. URL
c. Binary
d. Hex
Answer: (b) URL
16. Which of these is usually referred to as the port number (default) of several web servers like
apache?
a. 40
b. 20
c. 87
d. 80
Answer: (d) 80
17. Which of these is a sort of independent type of malicious program that would not require any
host program?
a. Virus
b. Trap Door
c. Worm
d. Trojan Horse
Answer: (c) Worm
7. Which of these keywords do we use for the declaration of the friend function?
a. myfriend
b. classfriend
c. friend
d. firend
Answer: (c) friend
13. Which header file do we use for the generation of random numbers?
a. <random>
b. <generator>
c. <distribution>
d. <gen_dist>
Answer: (a) <random>
14. Which container is the best for keeping a collection of various distinct elements?
a. queue
b. set
c. heap
d. multimap
Answer: (b) set
15. Inheritance models which type of relationship?
a. Belongs-to relationship
b. Part-Of relationship
c. Is-A relationship
d. Has-A relationship
Answer: (c) Is-A relationship
16. In heap, which of these values will be pointed out first?
a. First value
b. Lowest value
c. Third value
d. Highest value
Answer: (d) Highest value
17. Which of these functions is used for incrementing the iterator by a certain value?
a. move()
b. prev()
c. advance()
d. next()
Answer: (c) advance()
18. In the locale object, which of these objects’ information is loaded?
a. secant object
b. facet object
c. instead object
d. both instead & facet objects
Answer: (b) facet object
19. Which of these mathematics libraries is used in C++ for vector manipulation?
a. blitz++
b. stac++
c. vec++
d. cli+++
Answer: (a) blitz++
20. Which of these operators is used in order to capture every external variable by reference?
a. *
b. &&
c. &
d. =
Answer: (d) =
Computer Fundamentals Multiple-Choice Questions
1. The computer-assisted method that helps in the recording and analysis of a hypothetical or an
existing system is known as:
a. Data processing
b. Data capture
c. Data flow
d. Data transmission
Answer: (c) Data flow
2. Which of these computer languages do we use in artificial intelligence?
a. PROLOG
b. FORTRAN
c. COBOL
d. C
Answer: (a) PROLOG
3. Which of these parts would interpret a program’s instructions to initiate the control operations?
a. Logic unit
b. Control unit
c. Storage unit
d. Input
Answer: (b) Control unit
4. The 1’s complement of 10 is:
a. 10
b. 11
c. 110
d. 01
Answer: (d) 01
5. __________ is the computer program that would convert an assembly language to the machine
language.
a. Interpreter
b. Compiler
c. Comparator
d. Assembler
Answer: (d) Assembler
6. The total time for which any piece of equipment would operate is known as __________________
time.
a. Effective
b. Seek
c. Real
d. Access
Answer: (a) Effective
7. What access method do we use to obtain any record out of a cassette tape?
a. Random
b. Direct
c. Sequential
d. All of the above
Answer: (c) Sequential
8. What is the CPU’s section that interprets, selects, and also sees to a program instructions’
execution?
a. Register unit
b. Control unit
c. ALU
d. Memory
Answer: (b) Control unit
9. One packet on any data link is called:
a. Group
b. Block
c. Frame
d. Path
Answer: (c) Frame
10. What is the common boundary present between two systems known as?
a. Interface
b. Surface
c. Interdiction
d. None of the above
Answer: (a) Interface
11. _____________ is a computer that has been designed so that it is as compact as possible.
a. Supercomputer
b. Mini
c. Mainframe
d. Microcomputer
Answer: (d) Microcomputer
15. Which of these refers to a systems programming language for the Intel family microcomputers?
a. PLA
b. PL/CT
c. PL/M
d. PL/C
Answer: (c) PL/M
16. Out of the following, which one is still useful if we want to add numbers?
a. UNIVAC
b. Abacus
c. ENIAC
d. EDSAC
Answer: (b) Abacus
17. What is the number used to control the forms of other numbers known as?
a. Mask
b. Map
c. Marker
d. Mantissa
Answer: (a) Mask
18. Which of these is a high-level machine-oriented language for the machines that are of the GEC
4080 series?
a. ALGOL
b. Babbage
c. SNOBOL
d. LOGO
Answer (a)
a. URL rewriting
b. History
c. Cookies
d. SSL sessions
Answer (b)
3. Which of the following is stored at the client side?
a. URL rewriting
b. Hidden form fields
c. SSL sessions
d. Cookies
Answer (d)
4. Which of the following leads to high network traffic?
a. URL rewriting
b. Hidden form fields
c. SSL sessions
d. Cookies
Answer (a)
5. Which of the following is not true about session?
Answer (c)
6. What is the maximum size of cookie?
a. 4 KB
b. 4 MB
c. 4 bytes
d. 40 KB
Answer (a)
7. How can we invalidate a session?
a. session.discontinue()
b. session.invalidate()
c. session.disconnect()
d. session.falsify()
Answer (b)
8. Which method creates unique fields in the HTML, which are not shown to the user?
a. User authentication
b. URL writing
c. HTML Hidden field
d. HTML invisible field
Answer (c)
9. Which object is used by spring for authentication?
a. ContextHolder
b. SecurityHolder
c. AnonymousHolder
d. SecurityContextHolder
Answer (d)
10. Which page directive should be used in JSP to generate a PDF page?
a. contentType
b. generatePdf
c. typePDF
d. contentPDF
Answer (a)
11. Which tag should be used to pass information from JSP to included JSP?
Answer (a)
12. Application is an instance of which class?
a. javax.servlet.Application
b. javax.servlet.HttpContext
c. javax.servlet.Context
d. javax.servlet.ServletContext
Answer (d)
13. Which option is true about session scope?
a. Objects are accessible only from the page in which they are created
b. Objects are accessible only from the pages which are in the same session
c. Objects are accessible only from the pages which are processing the same request
d. Objects are accessible only from the pages which reside in the same application
Answer (b)
14. Which one is the correct order of phases in the JSP life cycle?
Answer (c)
15. “request” is an instance of which one of the following classes?
a. Request
b. HttpRequest
c. HttpServletRequest
d. ServletRequest
Answer (c)
16. Which is not a directive?
a. include
b. page
c. export
d. useBean
Answer (c)
17. Which is mandatory in <jsp:useBean /> tag?
a. id, class
b. id, type
c. type, property
d. type,id
Answer (a)
18. Which one of the following is correct for directive in JSP?
a. <%@directive%>
b. <%!directive%>
c. <%directive%>
d. <%=directive%>
Answer (a)
19. Which of the following action variables is used to include a file in JSP?
a. jsp:setProperty
b. jsp:getProperty
c. jsp:include
d. jsp:plugin
Answer (c)
20. Which attribute uniquely identifies an element?
a. ID
b. Class
c. Name
d. Scope
Answer (a)
21. “out” is the implicit object of which class?
a. javax.servlet.jsp.PrintWriter
b. javax.servlet.jsp.SessionWriter
c. javax.servlet.jsp.SessionPrinter
d. javax.servlet.jsp.JspWriter
Answer (d)
22. Which object stores references to the request and response objects?
a. sessionContext
b. pageContext
c. HttpSession
d. sessionAttribute
Answer (b)
23. What temporarily redirects response to the browser?
a. <jsp:forward>
b. <%@directive%>
c. response.sendRedirect(URL)
d. response.setRedirect(URL)
Answer (c)
24. Which tag is used to set a value of a JavaBean?
a. <c:set>
b. <c:param>
c. <c:choose>
d. <c:forward>
Answer (a)
25. Java code is embedded under which tag in JSP?
a. Declaration
b. Scriptlet
c. Expression
d. Comment
Answer (b)
Java MCQ Questions
1. Which of these components are used in a Java program for compilation, debugging, and
execution?
a. JDK
b. JVM
c. JRE
d. JIT
Answer: (a) JDK
2. Which of these literals can be contained in a float data type variable?
a. -3.4e+050
b. +1.7e+308
c. -3.4e+038
d. -1.7e+308
Answer: (b) -3.4e+038
3. What is BigDecimal.ONE?
a. it is a custom-defined statement
b. it is a wrong statement
c. it is a static variable that has a value of 1 on a scale of 0
d. it is a static variable that has a value of 1 on a scale of 10
Answer: (c) it is a static variable that has a value of 1 on a scale of 0
4. When an expression consists of int, double, long, float, then the entire expression will get
promoted into a data type that is:
a. float
b. double
c. int
d. long
Answer: (b) double
5. Which of the following operators can operate on a boolean variable?
A. &&
B. ==
C. ?:
D. +=
a) C & B
b) A & D
c) A, B & D
d) A, B & C
Answer: (d) A, B & C
6. Out of these statements, which ones are incorrect?
a. The Brackets () have the highest precedence
b. The equal to = operator has the lowest precedence
c. The addition operator + and the subtraction operator – have an equal precedence
d. The division operator / has comparatively higher precedence as compared to a multiplication
operator
Answer: (d) The division operator / has comparatively higher precedence as compared to a
multiplication operator
7. What will be the output of the following Java program?
class Output
{
public static void main(String args[])
{
int p = 1;
int q = 2;
int r = 3;
p |= 4;
q >>= 1;
r <<= 1;
p ^= r;
System.out.println(q + ” ” + q + ” ” + r);
}
}
a. 3 3 6
b. 2 3 4
c. 2 2 3
d. 3 1 6
Answer: (d) 3 1 6
8. What will be the output of the following Java code snippet?
class P
{
}
enum Enums extends P
{
PQR, QRS, RST, STU;
}
a) Compilation Error
b) Runtime Error
c) EnumNotDefined Exception
d) It runs successfully
Answer: (a) Compilation Error
13. What would happen to the thread whenever the garbage collection kicks off?
a. The garbage collection won’t happen until the running of the thread
b. The thread would continue its operation
c. The garbage collection and the thread don’t interfere with each other
d. The thread would be paused while the running of the garbage collection
Answer: (d) The thread would be paused while the running of the garbage collection
14. Out of these, which one is the correct way of calling a constructor that has no parameters of the
superclass A by the subclass B?
a. superclass.();
b. super(void);
c. super();
d. super.A();
Answer: (c) super();
15. Out of these methods of the Object class, which one can clone an object?
a. Object clone()
b. clone()
c. Object copy()
d. copy()
Answer: (a) Object clone()
16. Out of these packages, which one contains an abstract keyword?
a. java.util
b. java.lang
c. java.system
d. java.io
Answer: (b) java.lang
17. Out of these methods, which one can be used for converting all the characters present in a
String into an Array of characters?
a. both getChars() & toCharArray()
b. both charAt() & getChars()
d. charAt()
d. all of the mentioned
Answer: (a) both getChars() & toCharArray()
18. What value is returned by the compareTo() function in case the invoking string happens to be
greater than the compared string?
a. a value that is greater than zero
b. a value that is less than zero
c. zero
d. none of the above
Answer: (a) a value that is greater than zero
19. Out of these exceptions, which one is thrown by the compareTo() method that is defined in a
double wrapper?
a. SystemException
b. ClassCastException
c. IOException
d. CastException
Answer: (b) ClassCastException
20. Where does the String Pool get stored?
a. Metaspace
b. Java Stack
c. Java Heap
d. Permanent Generation
Answer: (c) Java Heap
21. Out of these data members of the HttpResponse class, which one is used for the storage of the
response that is from an http server?
a. address
b. status
c. statusCode
d. statusResponse
Answer: (c) statusCode
22. Out of these methods, which one makes the raw MIME formatted string?
a. toString()
b. getString()
c. parse()
d. parseString()
Answer: (c) parse()
23. The remover() method throws which of these exceptions:
a. ObjectNotFoundException
b. IllegalStateException
c. IOException
d. SystemException
Answer: (b) IllegalStateException
24. Out of the following, which one is a superclass of all the exception type classes?
a. String
b. RuntimeExceptions
c. Catchable
d. Throwable
Answer: (d) Throwable
25. What happens when we call two threads that have the same priority to process simultaneously?
a. Both of the threads will be simultaneouslyexecuted
b. Any one of the threads can be executed first lexicographically
c. Itdepends on the OS
d. There will be no execution of threads
Answer: (c) Itdepends on the OS
26. Out of these classes, which one is used for reading strings and characters in Java from the
console?
a. StringReader
b. BufferedReader
c. InputStreamReader
d. BufferedStreamReader
Answer: (b) BufferedReader
27. Out of these operators, which one can be used to get the run time info about an object?
a. Info
b. getInfo
c. getinfoof
d. instanceof
Answer: (d) instanceof
28. Out of these classes, which one allows a user to define their own formatting pattern for time and
dates?
a. UsersDateFormat
b. ComplexDateFormat
c. SimpleDateFormat
d. DefinedDateFormat
Answer: (c) SimpleDateFormat
29. Which method can we use in an applet to output a string?
a. transient()
b. drawString()
c. print()
d. display()
Answer: (b) drawString()
30. The public int start() returns what?
a. the start index of the previous match
b. the start index of the current match
c. the start index of the input string
d. None of the above
Answer: (a) the start index of the previous match
31. Which one is a superclass of the ContainerEvent class out of the following?
a. ComponentEvent
b. InputEvent
c. ItemEvent
d. WindowEvent
Answer: (a) ComponentEvent
32. _______ is a superclass of all the Adapter classes.
a. ComponentEvent
b. Applet
c. InputEvent
d. Event
Answer: (b) Applet
33. Which method in Java generates boolean random values?
a. randomBoolean()
b. nextBoolean()
c. generateBoolean()
d. previousBoolean()
Answer: (b) nextBoolean()
34. Which class produces objects with respect to their geographical locations?
a. Simple TimeZone
b. Date
c. Locale
d. TimeZone
Answer: (c) Locale
35. Which method is used for notifying the observer about the change in the observed object?
a. notify()
b. update()
c. observed()
d. check()
Answer: (b) update()
36. Which package is used to remotely invoke a method?
a. java.awt
b. java.rmi
c. java.applet
d. java.util
Answer: (b) java.rmi
37. What are the uses of generics?
a. The generics make a code more readable and optimised
b. The generics make a code faster
c. The generics add stability to a code. They do so by making more bugs detectable at the runtime
d. The generics add stability to a code. They do so by making more bugs detectable at the compile
time
Answer: (d) The generics add stability to a code. They do so by making more bugs detectable at the
compile time
38. Which mechanism helps in the process of naming as well as visibility control of the classes and
their content?
a. Packages
b. Interfaces
c. Object
d. None of the above
Answer: (a) Packages
39. The configuration is stored in which of the file database tables:
a. .sql
b. .ora
c. .hbm
d. .dbm
Answer: (c) .hbm
42. Out of the following statements, which one is not true about the Java beans?
a. It extends the java.io.Serializable class
b. It implements the java.io.Serializable interface
c. It provides getter and setter methods for its properties
d. It provides us with no argument constructor
Answer: (a) It extends the java.io.Serializable class
43. What does the abbreviation MVC pattern stand for?
a. Model View Class
b. Mock View Class
c. Mock View Controller
d. Model View Control
Answer: (d) Model View Control
44. The advantage of using the PreparedStatement in Java is:
a. More memory usage
b. Prevents SQL injection
c. Encourages SQL injection
d. Slow performance
Answer: (b) Prevents SQL injection
45. How does one move from some desired step to another one?
a. logger.error
b. logger.log
c. System.out.println
d. breakpoints
Answer: (d) breakpoints
46. What would happen if the IP Address of the host can’t be determined?
a) IOException is thrown
b) The system will exit with no message
c) Temporary IP Address will be assigned
d) UnknownHostException is thrown
Answer: (d) UnknownHostException is thrown
47. The storage capacity of a single cookie is:
a) 4095 MegaBytes
b) 4095 bytes
c) 2048 bytes
d) 2048 MegaBytes
Answer: (b) 4095 bytes
Answer (b)
Answer (d)
Answer (d)
Answer (a)
Answer (b)
Answer (a)
7. What does HTML stand for?
a. Hyper Text Markup Language
b. High Text Markup Language
c. Hyper Tabular Markup Language
d. None of these
Answer (a)
8. The following statements are about three important browser objects in JavaScript.
I. window object : The highest of all objects in the client-side JavaScript object hierarchy.
II. navigator object : A collection of information about the browser. Useful in browser sniffing.
III. document object : Provides access to the document being viewed.
Which of the above statements is/are true?
Answer (d)
9. The following message is displayed on the browser, while trying to access a URL
Answer (d)
Answer (b)
11. Which one among these is used with tag as an attribute to specify alternate text for an
image, if the image is not displayed for some reason?
a. alt
b. Alternate
c. Duplicate
d. Auxiliary
Answer (a)
Answer (a)
Answer (b)
Answer (b)
Answer (b)
17. Which method of the Component class is used to set the position and size of a component in
JSP?
a. setSize()
b. setBounds()
c. setPosition()
d. setPositionSize()
Answer (b)
Answer (d)
19. In JSP, a Canvas object provides access to a Graphics object via one of its method called
a. getCanvas()
b. getGraphics()
c. paint()
d. getPaint()
Answer (c)
20. How can you open a link in a new browser window?
a. < a href = “url” target = “new”>
b. <a href = “url” target= “_blank”>
c. <a href = “url”.new>
d. <a href = “url” target =”open”>
Answer (b)
21. The tag used to create a hypertext relationship between current document and another URL
is
a. <ISINDEX>
b. <A>
c. <LINK>
d. None of these
Answer (c)
Answer (b)
Answer (d)
Answer (A)
Answer (d)
IoT Multiple-Choice Questions
1. Which network is used by a sensor?
a. PAN and LAN
b. PAN and HAN
c. HAN and LAN
d. HAN, PAN, and LAN
Answer: (d) HAN, PAN, and LAN
2. A gateway software must be smart enough so that it can handle _____________.
a. Sensors
b. Logging
c. Message
d. GPS
Answer: (b) Logging
3. Dell uses which of these Edge gateway models?
a. 3500
b. 4000
c. 4500
d. 5000
Answer: (d) 5000
12. The address of the original IEEE 802 MAC comes from ___________.
a. Http
b. Ethernet address
c. IP address
d. MAC address
Answer: (b) Ethernet address
13. Gateway provides the connection between _________ and _________.
a. Controller and device
b. Network and Controller
c. Network and Cloud
d. Cloud and Controller
Answer: (d) Cloud and Controller
14. ___________ introduced the Wind River:
a. Intel
b. IBM
c. Syntel
d. Tech Mahindra
Answer: (a) Intel
15. The __________ transportation brings some new control:
a. Building Automation
b. Smart Energy
c. Industrial automation
d. Route Navigation
Answer: (a) Building Automation
16. The XMPP implementation utilises ______________.
a. Gaming
b. CoAP
c. Polling
d. Email
Answer: (c) Polling
10. In PHP, which of these functions is used to get any ASCII value of the given character?
a. chr()
b. ascii()
c. asc()
d. val()
Answer: (a) chr()
11. Which of these functions is used for sorting an array in a descending order?
a. rsort()
b. dsort()
c. asrot()
d. sort()
Answer: (a) rsort
12. In PHP, which of these do we use to end a statement?
a. ; (semicolon)
b. . (dot)
c. / (slash)
d. ! (exclamation)
Answer: (a) ; (semicolon)
13. In PHP, what is the correct way in which we can print “Hello World”?
a. write(“Hello World”);
b. echo “Hello World”;
c. “Hello World”;
d. None of the above
Answer: (b) echo “Hello World”;
14. Out of the following functions in PHP, which of these is used to compress a string?
a. zip_compress()
b. compress()
c. zip()
d. gzcompress()
Answer: (d) gzcompress()
15. Out of the following functions, which one converts a string to all uppercases?
a. strtoupper()
b. struppercase()
c. uppercase()
d. upper()
Answer: (a) strtoupper()
16. In PHP, _____________ is a function that can be used for concatenating array elements for the
formation of a single delimited string:
a. concat()
b. implode()
c. concatenate()
d. explode()
Answer: (b) implode()
17. The output of this program would be:
<?php
echo ucwords(“visit us at thinkLearn.com”);
?>
a. Visit us at thinkLearn.com
b. visit us at thinkLearn.com
c. Visit Us At ThinkLearn.com
d. Visit us at ThinkLearn.com
Answer (c) Visit Us At ThinkLearn.com
18. The output of the program mentioned below would be:
<?php
$a = array(16, 5, 2);
echo array_product($a);
?>
a. 32
b. 80
c. 1652
d. 160
Answer: (d) 160
19. Which of these PHP functions would perform the conversion of an English text datetime into the
Unix timestamp?
a. strtotime()
b. str_to_time()
c. strtodate()
d. None of the above
Answer: (a) strtotime()
20. In PHP, which of the following functions would return the time of the sunrise on a particular day
and at a particular location?
a. sunrise()
b. date_sunrise()
c. date-sunrise()
d. None of the above
Answer: (b) date_sunrise()
JavaScript Multiple-Choice Questions
1. The ” var” and “function” are known as _____________.
a. Data types
b. Keywords
c. Prototypes
d. Declaration statements
Answer: (d) Declaration statements
2. Which of these is the correct way in which we can call the JavaScript code?
a. Triggering Event
b. Preprocessor
c. Function/Method
d. RMI
Answer: (c) Function/Method
3. Which of these functions of the Number Object would format a number with different numbers of
digits to the decimal’s right?
a. toFixed()
b. toExponential()
c. toLocaleString()
d. toPrecision()
Answer: (a) toFixed()
4. Out of the following functions of the string object, which one would return the character in any
string via the specified number of characters starting at a specified position?
a. search()
b. substr()
c. split()
d. slice()
Answer: (b) substr()
5. Look at the snippets given below and check the one in which the variable “a” isn’t equal to the
“NULL”.
a. if (a!)
b. if(a!=null)
c. if(a!==null)
d. if(a!null)
Answer: (c) if(a!==null)
6. In JavaScript, what do we use for calling the expression for function definition?
a. Function literal
b. Function prototype
c. Function declaration
d. Function calling
Answer: (a) Function literal
7. Which of these is used in JavaScript for calling a method or a function?
a. Functional Expression
b. Property Access Expression
c. Primary Expression
d. Invocation Expression
Answer: (d) Invocation Expression
8. Which of these operators are used for checking if a specific property exists?
a. in
b. within
c. exist
d. exists
Answer: (a) in
9. “The expression that can appear legally on an assignment expression’s left side” is a common
explanation for variables, elements of arrays, and properties of objects. These are known as
__________:
a. Prototypes
b. Properties
c. Lvalue
d. Definition
Answer: (c) Lvalue
10. Which of these is a correct output for the JavaScript code given below?
string X= “Hey”;
string Y=”There”;
alert(X+Y);
a. Hey There
b. Hey_There
c. HeyThere
d. undefined
Answer: (c) HeyThere
11. Which of these is known as the Equality operator used for checking whether both the values are
equal?
a. =
b. ==
c. ===
d. &&
Answer: (b) ==
12. In case a value of an operator is NULL, then the unary operator would return the ____________
typeof.
a. object
b. boolean
c. string
d. undefined
Answer: (d) undefined
13. Which of these is not a keyword?
a. debugger
b. use strict
c. with
d. if
Answer: (b) use strict
14. Which of these symbols is used to create comments in JavaScript?
a. //
b. \\
c. \* */
d. \* *\
Answer: (a) //
15. In the line of code given below, what will the “datatype” written in brackets be called?
article[datatype]=assignment_value;
a. An object
b. A String
c. Floating point
d. An integer
Answer: (b) A String
16. In the line of code given below, the prototype represents the _____________.
functionx(){};
a. Prototype of a function
b. Function x
c. Not valid
d. A custom constructor
Answer: (a) Prototype of a function
17. Which of these methods or operators are used for identifying an array?
a. isarrayType()
b. ===
c. ==
d. Typeof
Answer: (a) isarrayType()
18. A function’s execution would stop whenever a program control would encounter the _________
statement in the function’s body.
a. goto statement
b. break statement
c. continue statement
d. return statement
Answer: (d) return statement
19. Which of these codes is equivalent to the code given below?
a.x(g,h);
a. a [ “x” ] ( g , h );
b. x (g) &&a.x (h);
c. x( g&&h );
d. a (x )[ “g” , “h” ];
Answer: (a) a [ “x” ] ( g , h );
20. Which of these keywords is used to define various functions in JavaScript?
a. function
b. main
c. init
d. Void
Answer: (a) function
7. Which HTML tag do we use to display text along with a scrolling effect?
a. <div>
b. <scroll>
c. <marquee>
d. None of the above
Answer: (c) <marquee>
11. Which of these tags helps in the creation of a drop-down box or a combo box?
a. <input type = “dropdown”>
b. <list>
c. <ul>
d. <select>
Answer: (d) <select>
12. Which tag is used in HTML5 for the initialization of the document type?
a. <Doctype HTML>
b. <!DOCTYPE html>
c. <Doctype>
d. <\Doctype html>
Answer: (b) <!DOCTYPE html>
13. What is the correct way in which we can start an ordered list that has the numeric value count of
5?
a. <ol type = “1” start = “5”>
b. <ol type = “1” num = “5”>
c. <ol type = “1” begin = “5”>
d. <ol type = “1” initial = “5”>
Answer: (a) <ol type = “1” start = “5”>
14. Which one is the HTML document’s root tag?
a. <head>
b. <body>
c. <title>
d. <html>
Answer: (d) <html>
15. Which HTML tag do we use for displaying the power in the expression, (x² – y²)?
a. <p>
b. <sub>
c. <sup>
d. None of the above
Answer: (c) <sup>
16. In HTML, the correct way of commenting out something would be using:
a. ## and #
b. <!– and –>
c. </– and -/->
d. <!– and -!>
Answer: (b) <!– and –>
17. How does the <bdo> element work?
a. changes direction of the ltr text
b. override the direction of the rtl text
c. stops writing in current direction of text
d. override the text direction
Answer: (d) override the text direction
19. The non-ASCII characters would be replaced with ________ by the process of URL encoding.
a. “+”
b. “%”
c. “&”
d. “*”
Answer: (b) “%”
4. Out of the following, which one is not a workbench tool for Requirement Management?
a. RDD 100
b. Rational Suite
c. DOORS
d. RTM
Answer: (b) Rational Suite
5. In system modelling, which model depicts a system’s static nature?
a. Data Model
b. Structural Model
c. Context Model
d. Behavioural Model
Answer: (b) Structural Model
6. Source code translation and Program modularisation are the activities of_____________.
a. Reverse engineering
b. Forward Engineering
c. Reengineering and Reverse Engineering
d. Reengineering
Answer: (d) Reengineering
7. Which of these reliability requirements is concerned with maintaining various system copies?
a. Ambiguous Requirements
b. Redundancy Requirements
c. Recovery Requirements
d. Checking Requirements
Answer: (c) Recovery Requirements
8. The worst form of module cohesion is___________.
a. Coincidental Cohesion
b. Functional Cohesion
c. Temporal Cohesion
d. Logical Cohesion
Answer: (a) Coincidental Cohesion
9. How does the implementation of generalisation occur in Object-Oriented programming
languages?
a. Encapsulation
b. Abstract Classes
c. Inheritance
d. Polymorphism
Answer: (c) Inheritance
10. Out of these early OOD methods, which one incorporates both a “macro development process”
and a “micro development process.”?
a. Wirfs-Brock method
b. Booch method
c. Coad and Yourdon method
d. Rumbaugh method
Answer: (b) Booch Method
11. Out of these web engineering metrics, which one measures the relatedness extent between
multiple web pages?
a. Static Content Objects Numbers
b. Dynamic Content Objects Numbers
c. Internal Page Links Number
d. Web Page Similarity
Answer: (d) Web Page Similarity
22. The FIT (Failure In Time) is another way in which one can REPORT __________.
c. MTBF
d. MTSF
a. MTTF
b. MTTR
Answer: (a) MTBF
23. What do we mean by Six Sigma?
a. A widely used strategy to implement statistical quality assurance
b. Six standard deviations
c. A widely used strategy that maintains statistical quality assurance and six standard deviations
d. An FTR (Formal Technical Review) guideline for inspection or a quality walkthrough
Answer: (c) A widely used strategy that maintains statistical quality assurance and six standard
deviations
24. Name an evaluation technique to assess the quality of test cases.
a. Validation
b. Mutation analysis
c. Performance analysis
d. Verification
Answer: (b) Mutation analysis
25. Code is checked in which type of testing?
a. White box testing
b. Black box testing
c. Green box testing
d. Red box testing
Answer: (a) White box testing
2. The time complexity used for inserting a node in a priority queue on the basis of key is:
a. O(n)
b. O(n2)
c. O(nlogn)
d. O(logn)
Answer: (a) O(n)
15. The time does taken for the construction of suffix tree is:
a. Linear to the Length of Tree
b. Exponential to the Length of Tree
c. O (M!)
d. O (log M)
Answer: (a) Linear to the Length of Tree
16. The best technique for handling collision is:
a. Separate chaining
b. Double hashing
c. Linear probing
d. Quadratic probing
Answer: (d) Quadratic probing
17. Which one is the most desirable out of these traits of a hash function?
a. it must cause more collisions
b. it must be easy to implement
c. it must cause less collisions
d. it must occupy less space
Answer: (c) it must cause less collisions
18. What is the time complexity for checking if an undirected graph with E edges and V vertices is
Bipartite, given its adjacency matrix?
a. O(E)
b. O(V)
c. O(E*E)
d. O(V*V)
Answer: (d) O(V*V)
19. The members of two of the sets are relatively more common when the Jaccard Index is:
a. Closer to 0
b. Closer to 1
c. Farther to 1
d. Closer to -1
Answer: (b) Closer to 1
20. The polynomial-time graph manipulation algorithms can’t implement which of these logical
operations using the Binary Decision Diagrams?
a. Tautology Checking
b. Negation
c. Disjunction
d. Conjunction
Answer: (a) Tautology Checking
15. A transaction enters into its _______ state when it finishes the final statement.
a. Abort state
b. Partially committed state
c. Committed state
d. Active state
Answer: (b) Partially committed state
16. An operator shall provide the transaction file’s name, and the file consisting of the edited
transactions (that are ready for execution) must be called:
a. Trans. Exe
b. Batch. Exe
c. Edit. Exe
d. Opt. Exe
Answer: (d) Opt. Exe
17. In crabbing, the protocol locking goes:
a. down the tree, back up
b. up the tree, back down
c. down the tree, releases
d. up the tree, releases
Answer: (a) down the tree, back up
18. The name of the very first microprocessor chip available commercially was:
a. Intel 4004
b. Intel 639
c. Intel 308
d. Motorola 33
Answer: (a) Intel 4004
19. The easiest way in which we can transfer control is when the old backup site sends __________
to the old primary.
a. Redo logs
b. Primary Logs
c. Undo Logs
d. All of the above
Answer: (b) Primary Logs
20. A linear search algorithm’s complexity would be:
a. O(n2)
b. O(n log n)
c. O(n)
d. O(log n)
Answer: (c) O(n)
Answer: (a) =
12. Out of the following function definition, which one will run correctly?
a.
int sum(int x, int y)
return (x + y);
b.
int sum(int x, int y)
{return (x + y);}
c.
int sum(x, y)
return (x + y);
d. none of the above
Answer: (b)
int sum(int x, int y)
{return (x + y);}
7. A CPU yields 32-bit virtual addresses, and the page size is 4 kilobytes. Here, the processor
consists of a TLB (translation lookaside buffer). It is a 4-way set associative, and it can hold a total of
128-page table entries. The TLB tag’s minimum size is:
a. 20 bits
b. 15 bits
c. 13 bits
d. 11 bits
Answer: (b) 15 bits
8. Thrashing occurs in a system when:
a. The processes on the system access pages and not memory frequently
b. A page fault pops up
c. The processes on the system are in running state
d. The processes on the system are in the waiting state
Answer: (a) The processes on the system access pages and not memory frequently
9. The page fault occurs whenever:
a. The requested page isn’t in the memory
b. The requested page is in the memory
c. An exception is thrown
d. The page is corrupted
Answer: (a) The requested page isn’t in the memory
10. Consider a computer that uses 32–bit physical address, 46–bit virtual address, along with a page
table organisation that is three-level. Here, the base register of the page table stores the T1 (first–
level table) base address, which occupies exactly one page. Every entry of the T1 stores the T2
(second-level table) page’s base address. Similarly, every entry of T2 stores the T3 (third-level table)
page’s base address and every entry of T3 stores a PTE (page table entry). The size of PTE is 32
bits. In the computer, the processor has a 1 MB 16 way virtually indexed set-associative physically
tagged cache. If the size of the cache block is 64 bytes, then what is the size of a page in this
computer in Kilobytes?
a. 4
b. 2
c. 16
d. 8
Answer: (d) 8
11. Consider that the page fault service time in a computer is 10ms and the average memory access
time is 20ns. If, in case, it generates a page fault every 10^6 memory accesses, then what would be
the effective access time for this memory?
a. 30ns
b. 21ns
c. 35ns
d. 23ns
Answer: (a) 30ns
12. FIFO policy is used in a system for page replacement. It consists of 4-page frames, and no
pages loaded, to start with. This system initially accesses 100 separate pages in a particular order. It
then accesses these same 100 pages. The difference is that now they are in the reverse order.
Considering this, how many page faults would occur here?
a. 192
b. 195
c. 196
d. 197
Answer: (c) 196
19. A system that has 32-bit virtual addresses & 1 KB page size, it is not practical to use one-level
page tables for translating virtual to a physical address, due to:
a. a large amount of external fragmentation
b. a large amount of internal fragmentation
c. a large computation overhead in the process of translation
d. a large memory overhead when maintaining the page tables
Answer: (d)a large memory overhead when maintaining the page tables
20. Which of these isn’t an advantage of using dynamically linked, shared libraries, as compared to
statically linked libraries?
a. Faster program startup
b. The existing programs do not need to be re-linked so as to take advantage of the newer library
versions
c. Lesser page fault rate in a system
d. Smaller sizes of executable files
22. The process of dynamic linking can generate security concerns because:
a. Linking is insecure
b. The cryptographic procedures aren’t available for the process of dynamic linking
c. Security is dynamic
d. The path of the searching dynamic libraries isn’t known until the runtime
Answer: (b)The cryptographic procedures aren’t available for the process of dynamic linking
23. Which of these is a false statement?
a. The virtual memory translates a program‘s address space into their physical memory address
space.
b. The virtual memory allows every program to exceed the primary memory’s size.
c. The virtual memory leads to an increase in the degree of multiprogramming
d. The virtual memory leads to a reduction of the context switching overhead
Answer: (d)The virtual memory leads to a reduction of the context switching overhead
24. ________ is the process in which load addresses are assigned to a program’s various parts, and
the code and date are adjusted in the program for the reflection of the assigned addresses.
a. Symbol resolution
b. Assembly
c. Parsing
d. Relocation
Answer: (d)Relocation
25. Which one of these is NOT shared by the same process’s threads?
a. Address Space
b. Stack
c. Message Queue
d. File Descriptor Table
Answer: (b)Stack
26. In the case of a particular Unix OS, every data block is 1024 bytes in size. Every node consists
of 10 direct data block addresses along with three additional addresses: one for a triple, one for
double, and one for a single indirect block. Each block here can consist of addresses for 128 blocks.
Out of the following, which one is the approximate maximum size of the files in a file system?
a. 16 GB
b. 8 GB
c. 2 GB
d. 512 MB
Answer: (c) 2GB
27. Which of these disk scheduling policies results in minimum head movement?
a. Circular scan
b. Elevator
c. FCS
d. None of the above
Answer: (a) Circular scan
28. Consider a hard disk that has 63 sectors/track. It has 10 platters each – 2 recording surfaces &
1000 cylinders. A sector’s address is displayed as a triple (c, h, s). Here, c refers to the cylinder
number, h refers to the surface number, and s refers to the sector number. The 0th sector here is
addressed as (0, 0, 0), then the 1st sector will be addressed as (0, 0, 1), and so on. According to
this, the address (400,16,29) would correspond to the sector number:
a. 505038
b. 505037
c. 505036
d. 505035
Answer: (b)505037
29. In a magnetic disk that consists of concentric circular tracks, its seek latency isn’t proportional
linearly to the seek distance, because of:
a. the use of arm scheduling policies that are unfair
b. a higher track capacity on the platter’s periphery
c. a starting and stopping inertia for arms
d. a non-uniform distribution of all the requests
Answer: (c) a starting and stopping inertia for arms
30. Out of the following statements, which ones are NOT true about asynchronous and synchronous
I/O?
a. In a synchronous I/O, any process that is waiting for the I/O’s completion is woken up by the
Interrupt Service Routine that is invoked after the I/O gets completed.
b. The processes that make the synchronous I/O call wait until I/O gets completed, but the
processes that make an asynchronous I/O call don’t wait for the completion of the I/O.
c. In both asynchronous and synchronous I/O, an Interrupt Service Routine (ISR) is invoked after the
I/O is finally completed.
d. The ISR is invoked after completing the I/O in synchronous I/O. It does not do so in the case of
asynchronous I/O.
Answer: (d) The ISR is invoked after completing the I/O in synchronous I/O. It does not do so in the
case of asynchronous I/O.
31. The usage of some larger block size in a file system of a fixed block size leads to:
a. a better disk space utilisation but poorer disk throughput
b. a poorer disk space utilisation and poorer disk throughput
c. a poorer disk space utilisation but better disk throughput
d. a better disk space utilisation and better disk throughput
Answer: (c) a poorer disk space utilisation but better disk throughput
32. Out of the following, which one needs a device driver?
a. Main memory
b. Disk
c. Register
d. Cache
Answer: (b)Disk
33. The onboard memory of a graphics card is about 1 MB. Out of the modes mentioned below,
which one does the card not support?
a. A resolution of 1600 x 400 and a 17-inch monitor with 256 colours.
b. A resolution of 1600 x 400 and a 14-inch monitor with 16 million colours.
c. A resolution of 800 x 400 and a 17-inch monitor with 16 million colours.
d. A resolution of 800 x 800 and a 14-inch monitor with 256 colours.
Answer: (b) A resolution of 1600 x 400 and a 14-inch monitor with 16 million colours.
34. Out of the following interrupt handling mechanisms and DMA transfer modes, which one enables
the highest bandwidth for I/O:
a. Polling interrupts and Transparent DMA
b. Vectored interrupts and Cycle-stealing
c. Vectored interrupts and Block transfer
d. Polling interrupts and Block transfer
Answer: (c) Vectored interrupts and Block transfer
35. Assume three processes with process IDs 0, 1, and 2, respectively. They have computed time
bursts of 2, 4, and 8 units, and all the processes arrive at time 0. Now consider the LRTF (longest
remaining time first) scheduling algorithm. In the case of LRTF, the ties are broken by prioritising the
process that has the lowest process ID. Here, the average turnaround time would be:
a. 16 units
b. 15 units
c. 14 units
d. 13 units