Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

A communication device that combines transmissions from several I/O devices into one line is a

A. Concentrator
B. Modifier
C. Multiplexer
D. Full duplex file
Answer» D. Full duplex file
2.

Which of the following OSI layers correspond to TCP/IP's application layer?

A. Application
B. Presentation
C. Session
D. All of the above
Answer» E.
3.

DNS can obtain the ................. of host if its domain name is known and vice versa.

A. Station address
B. IP address
C. Port address
D. Checksum
Answer» C. Port address
4.

The data unit in the TCP/IP layer called a .....

A. Message
B. Segment
C. Datagram
D. Frame
Answer» E.
5.

Which of the following applications allows a user to access and change remote files without actual transfer?

A. DNS
B. FTP
C. NFS
D. Telnet
Answer» D. Telnet
6.

TCP/IP ................. layer corresponds to the OSI models to three layers.

A. Application
B. Presentation
C. Session
D. Transport
Answer» B. Presentation
7.

If all devices are connected to a central hub, then topology is called

A. Bus Topology
B. Ring Topology
C. Star Topology
D. Tree Topology
Answer» D. Tree Topology
8.

Which of the transport layer protocols is connectionless?

A. UDP
B. TCP
C. FTP
D. Nvt
Answer» B. TCP
9.

Which is the main function of transport layer?

A. Node to node delivery
B. End to end delivery
C. Synchronization
D. Updating and maintaining routing tables
Answer» C. Synchronization
10.

FDDI stands for

A. Fiber Distributed Data Interface
B. Fiber Data Distributed Interface
C. Fiber Dual Distributed Interface
D. Fiber Distributed Data Interface
Answer» E.
11.

Which of the following are the network services?

A. File service
B. Print service
C. Database service
D. All of the above
Answer» E.
12.

Ethernet system uses which of the following technology.

A. Bus
B. Ring
C. Star
D. Tree
Answer» B. Ring
13.

The computer network is

A. Network computer with cable
B. Network computer without cable
C. Both of the above
D. None of the above
Answer» D. None of the above
14.

FDDI used which type of physical topology?

A. Bus
B. Ring
C. Star
D. Tree
Answer» C. Star
15.

The .......... property specifies which element the properties are relative to and if it is null, the properties are document object.

A. offsetLeft
B. offsetTop
C. offsetParent
D. offsetRelative
Answer» D. offsetRelative
16.

The ......... method ensures that the element on which it is invoked is visible in the view-port.

A. scrollTop()
B. scrollBy()
C. scrollLeft()
D. scrollIntoView()
Answer» E.
17.

The .......... method of the window is similar to scroll() and scrollTo(), but its arguments are relative and are added to the current scroll bar offsets.

A. scrollTop()
B. scrollBy()
C. scrollLeft()
D. scrollIntoView()
Answer» C. scrollLeft()
18.

.......... method is used in the case of passing the coordinates of the mouse pointer to determine which element the mouse is over.

A. getBoundingClientRect()
B. getElementFromPoint()
C. elementFromPoint()
D. getElementCoordinates()
Answer» D. getElementCoordinates()
19.

.......... method returns a selection object that describes the current selection as a sequence of one or more range objects.

A. window.objectSelection()
B. window.getSelection()
C. document.getSelection()
D. document.currentSelection()
Answer» C. document.getSelection()
20.

........... are the size of an element's content area plus its padding plus any overflowing content.

A. offesetLeft and offesetTop
B. clientWidth and clientHeight
C. clientLeft and clientTop
D. scrollWidth and scrollHeight
Answer» E.
21.

When a document contains scrollable elements with overflowing content, the ............ method doesn't work correctly because it does not take scroll bar position into account.

A. getElementPosition()
B. getScrollPosition()
C. getScrollOffsets()
D. getBoundingClientRect()
Answer» B. getScrollPosition()
22.

State whether the following statements are True or False for the document.write() method in client side JavaScript.i) The document.write() method was one of the very first scriptable APIs implemented by Netscape2 web browser.ii) document.write() concatenates its string arguments and inserts the resulting string into the document at the location of the script element that invoked it.iii) The document.write() method is commonly used in modern code i.e. innerHTML property and other DOM techniques.

A. i-True, ii-True, iii-False
B. i-True, ii-False, iii-False
C. i-True, ii-True, iii-True
D. i-False, ii-False, iii-True
Answer» B. i-True, ii-False, iii-False
23.

............. properties return the horizontal and vertical distance between the outside of an element's padding and the outside of its border.

A. offesetLeft and offesetTop
B. clientWidth and clientHeight
C. clientLeft and clientTop
D. scrollWidth and scrollHeight
Answer» D. scrollWidth and scrollHeight
24.

......... are like offesetWidth and offesetHeight except that they do not include the border size, only content area and its padding.

A. offesetLeft and offesetTop
B. clientWidth and clientHeight
C. clientLeft and clientTop
D. scrollWidth and scrollHeight
Answer» C. clientLeft and clientTop
25.

.......... method of the window object takes the X and Y coordinates of a point in document coordinates and sets these as the scroll bar offsets.

A. scrollTo()
B. scrollLeft()
C. scrollTop()
D. scrollFor()
Answer» B. scrollLeft()
26.

The ........... method allows us to determine the current position of an element in a view-port.

A. getBoundingClientRect()
B. elementFromPoint()
C. getElementByTagName()
D. pageXoffset()
Answer» B. elementFromPoint()
27.

A .......... is a special kind of node that serves as a temporary container for other nodes.

A. Document Node
B. Document Partial
C. Document Fragment
D. Document Temporary
Answer» D. Document Temporary
28.

The read-only .......... properties of any HTML element return its on screen size, in CSS pixels.

A. offsetWidth()
B. offsetHeight()
C. Both A and B
D. None of the above
Answer» D. None of the above
29.

We can compute the position of the element with ..........., converts that position to document coordinates and then use the scrollTo() method.

A. getBoundingClient()
B. getBounding()
C. getBoundingClientRect()
D. getBoundingRect()
Answer» D. getBoundingRect()
30.

.......... can have any number of children, which we can manipulate with appendChild(), insertBefore() and so on.

A. Document Node
B. Document Partial
C. Document Fragment
D. Document Temporary
Answer» D. Document Temporary
31.

.......... takes two arguments, the first argument is the node to be inserted and the second argument is the node before which that node is to be inserted.

A. insertBefore()
B. appendChild()
C. insertAfter()
D. appendNode()
Answer» B. appendChild()
32.

........... returns a copy suitable for insertion into the document and passes true as the second argument to recursively import all descendants.

A. importNode()
B. cloneNode()
C. copyNode()
D. passNode()
Answer» B. cloneNode()
33.

Every node has ........... method that returns a new copy of the node and passes true to recursively copy all descendants as well, or false to only make a shallow copy.

A. importNode()
B. cloneNode()
C. copyNode()
D. passNode()
Answer» C. copyNode()
34.

State whether the following statements are True or False for inserting nodes.i) If you pass null in the second argument, the insertBefore() behaves like appendChild() and inserts at the end.ii) If you call appendChild() or insertBefore() to insert a node that is already in the document, that node will automatically be removed from its current position and reinserted at its new position.

A. i-True, ii-False
B. i-False, ii-True
C. i-False, ii-False
D. i-True, ii-True
Answer» E.
35.

........ is invoked on the element node that you want to insert into, and it inserts the specified node so that it becomes the last child of that node.

A. insertBefore()
B. appendChild()
C. insertAfter()
D. appendNode()
Answer» C. insertAfter()
36.

We can create new element nodes with the ........ method of the document object which can pass the tag name of the element as the method argument.

A. createElement
B. createNode
C. createDocumentNode
D. createElementNode
Answer» B. createNode
37.

To insert element content as Text Nodes, .......... property is read/write and you can set it to change the content displayed by a Text or CDATASection node.

A. nodeContent
B. nodeType
C. nodeText
D. nodeValue
Answer» E.
38.

State whether the following statements about inserting element content as plain text are True or False. i) The textContent and innerText properties are similar enough that we can usually use them interchangeably.ii) innerText is treated as a read-only property for certain table elements such as , and iii) The textContent property is a straightforward concatenation of all Text node descendants of the specified element.

A. i-True, ii-True, iii-False
B. i-True, ii-False, iii-False
C. i-True, ii-True, iii-True
D. i-False, ii-False, iii-True
Answer» D. i-False, ii-False, iii-True
39.

........ method allows you to insert a string of arbitrary HTML markupadjacentto the specified element.

A. insertAdjacentHTML()
B. insertBeforeHTML()
C. insertAfterHTML()
D. insertAfterendHTML()
Answer» B. insertBeforeHTML()
40.

For XML documents the include attributes from other namespaces, can use the namespace variants of which of the following method(s).

A. getAttributeNS()
B. setAttributeNS()
C. hasAttributeNS()
D. All of the above
Answer» E.
41.

HTML elements defines two methods ............ to check for the presence of named attribute and remove an attribute entirely.

A. getAttribute() and setAttribute()
B. hasAttribute() and removeAttribute()
C. hasDocument() and removeDocument()
D. hasElement() and removeElement()
Answer» C. hasDocument() and removeDocument()
42.

.............. methods can be used to query and set non standard HTML attributes and to query and set attributes on elements of an XML document.

A. getAttribute() and setAttribute()
B. getElement() and setElement()
C. getDocument() and setDocument()
D. getHTML() and setHTML()
Answer» B. getElement() and setElement()
43.

........ does not return the content of

A. insertText
B. innerText
C. textContent
D. plainContent
Answer» C. textContent
44.

........... is similar to textContent property introduced by Microsoft for Internet Explorer browser.

A. insertText
B. plainContent
C. textContent
D. innerText
Answer» E.
45.

..........property is used to insert plain text into a document without having to escape the angle brackets and ampersands used in HTML markup.

A. insertText
B. plainContent
C. textContent
D. plainText
Answer» D. plainText
46.

........... defines properties for the universal HTTP attributes such as id, title lang, and dir and event handler properties like onClick.

A. Element properties
B. HTMLElement
C. HTMLProperty
D. HTMLAttribute
Answer» C. HTMLProperty
47.

......... are not case sensitive, but JavaScript property names are.

A. Element properties
B. HTML element
C. HTML property
D. HTML attributes
Answer» E.
48.

........... is the ultimate element selection method and very powerful technique by which client side JavaScript programs can select the document elements that they are going to manipulate.

A. querySelectAll()
B. querySelector()
C. querySelectorAll()
D. querySelect()
Answer» D. querySelect()
49.

.......... takes a single string argument containing a CSS selector and returns a Nodelist that represents all elements in the document that match the selector.

A. getElementsById()
B. getElementsByName()
C. getElementsByClassName()
D. querySelectorAll()
Answer» E.
50.

Like getElementsByTagName(), .......... can be invoked on both HTML documents and HTML elements, and it returns a live NodeList containing all matching descendants of the document or element.

A. getElementsById()
B. getElementsByName()
C. getElementsByClassName()
D. All of the above
Answer» D. All of the above