Web Technology · Software Engineering and Web Technology
15 questions · asked in 7 of 27 years (2000–2026)
MCQ 151-mark 15
2000Questions per year2026
Questions 6–10 of 15
Which of the following is TRUE only of XML but NOT HTML?
Answer: (C)
XML and HTML are both derived from SGML. HTML works with a fixed set of tags, but XML allows you to create your own tags.
Answer: It allows user defined tags
Answer: It allows user defined tags
Consider the following clauses:
i. Not inherently suitable for client authentication.
ii. Not a state sensitive protocol.
iii. Must be operated with more than one server.
iv. Suitable for structured message organization.
v. May need two ports on the serve side for proper operation.
The option that has the maximum number of correct matches is
i. Not inherently suitable for client authentication.
ii. Not a state sensitive protocol.
iii. Must be operated with more than one server.
iv. Suitable for structured message organization.
v. May need two ports on the serve side for proper operation.
The option that has the maximum number of correct matches is
Answer: (D)
Check each clause against the protocols.
i. Not inherently suitable for client authentication: SMTP. Basic SMTP has no client login. Authentication came later as an extension (SMTP-AUTH).
ii. Not state sensitive: HTTP. Each request is independent, so HTTP is stateless (cookies are an add-on).
iii. Must be operated with more than one server: DNS. Every zone must be served by at least two name servers (primary and secondary).
iv. Suitable for structured message organization: IMAP. Mailboxes and folders stay on the server and are handled like local folders.
v. May need two ports on the server side: FTP. It uses a control connection (port 21) and a separate data connection (port 20 in active mode).
The best matching is SMTP-i, HTTP-ii, DNS-iii, IMAP-iv, FTP-v, but no option is exactly that, so count the correct pairs in each option.
(A) IMAP-i, FTP-ii, HTTP-iii, DNS-iv, POP3-v: none correct, so 0.
(B) FTP-i, POP3-ii, SMTP-iii, HTTP-iv, IMAP-v: none correct, so 0. FTP and POP3 both log the client in and keep session state.
(C) POP3-i, SMTP-ii, DNS-iii, IMAP-iv, HTTP-v: only DNS-iii and IMAP-iv are correct, so 2.
(D) SMTP-i, HTTP-ii, IMAP-iii, DNS-iv, FTP-v: SMTP-i, HTTP-ii and FTP-v are correct, so 3.
Option D has the most correct matches.
Answer: (D)
i. Not inherently suitable for client authentication: SMTP. Basic SMTP has no client login. Authentication came later as an extension (SMTP-AUTH).
ii. Not state sensitive: HTTP. Each request is independent, so HTTP is stateless (cookies are an add-on).
iii. Must be operated with more than one server: DNS. Every zone must be served by at least two name servers (primary and secondary).
iv. Suitable for structured message organization: IMAP. Mailboxes and folders stay on the server and are handled like local folders.
v. May need two ports on the server side: FTP. It uses a control connection (port 21) and a separate data connection (port 20 in active mode).
The best matching is SMTP-i, HTTP-ii, DNS-iii, IMAP-iv, FTP-v, but no option is exactly that, so count the correct pairs in each option.
(A) IMAP-i, FTP-ii, HTTP-iii, DNS-iv, POP3-v: none correct, so 0.
(B) FTP-i, POP3-ii, SMTP-iii, HTTP-iv, IMAP-v: none correct, so 0. FTP and POP3 both log the client in and keep session state.
(C) POP3-i, SMTP-ii, DNS-iii, IMAP-iv, HTTP-v: only DNS-iii and IMAP-iv are correct, so 2.
(D) SMTP-i, HTTP-ii, IMAP-iii, DNS-iv, FTP-v: SMTP-i, HTTP-ii and FTP-v are correct, so 3.
Option D has the most correct matches.
Answer: (D)
Consider the XML document fragment given below:
What would be the result of the given XPath expression when the current node is Book?
<Book>
<Title>GATE 2K7 Example<Title>
<Content>
One of many lines
</Content>
<TOC>
One of many content entries
</TOC>
</Book>Consider the XPath expression: *[not (self ) : : TOC]What would be the result of the given XPath expression when the current node is Book?
Answer: (A)
The expression is *[not(self::TOC)], with the current node Book.
- * selects all child elements of the current node: Title, Content and TOC.
- self::TOC is true for a node that is itself a TOC element.
- not(self::TOC) keeps only the children that are not TOC elements.
So the Title and Content elements are selected, and TOC is left out.
Answer: (A)
- * selects all child elements of the current node: Title, Content and TOC.
- self::TOC is true for a node that is itself a TOC element.
- not(self::TOC) keeps only the children that are not TOC elements.
So the Title and Content elements are selected, and TOC is left out.
Answer: (A)
Given below are some HTML lines.
1. Clicking on the point <80, 75> does not have any effect.
2. The web browser can identify the area applicable to the mouse-click within the image and the subsequent action to be taken without additional responses from the web server.
3. The dots in the cgi-bin URL will be resolved by the web browser before it is sent to the web server
4. The "fd.html" request when sent to the web server will result in a GET request.
Exactly how many of the statements given above are correct?
<img src = "pict.jpg" width = "256" height = "256" border = "0" usemap = "#map" />
<map name = "map" >
<area shape = "poly" coords = "50, 50, 50, 100, 100, 100, 75, 75, 100, 50" href = "fl.html">
<area shape= "circle" coords = "100, 75, 5" href = "../cgi-bin/f2.p1 ? v1 = ask abc's age">
<area shape=" default" href = "fd.html">
</map>With reference to the HTML lines given above, consider the following statements.1. Clicking on the point <80, 75> does not have any effect.
2. The web browser can identify the area applicable to the mouse-click within the image and the subsequent action to be taken without additional responses from the web server.
3. The dots in the cgi-bin URL will be resolved by the web browser before it is sent to the web server
4. The "fd.html" request when sent to the web server will result in a GET request.
Exactly how many of the statements given above are correct?
Answer: (D)
This is a client-side image map.
- Statement 1: The polygon (50,50), (50,100), (100,100), (75,75), (100,50) has a notch. At y = 75 it only covers x = 50 to 75. So (80, 75) lies outside the polygon. The circle has centre (100, 75) and radius 5. The point (80, 75) is 20 away from the centre, so it lies outside the circle too. The default area is used, and the click opens fd.html. So the click does have an effect, and the statement is false.
- Statement 2: With
usemap(a client-side map), the browser itself finds which area was clicked and which link to follow. This is true. - Statement 3: The browser resolves relative URLs such as
../cgi-bin/f2.plagainst the page URL before it sends the request. This is true. - Statement 4: Following a hyperlink (href) gives an HTTP GET request. This is true.
Three statements are correct.
Correct answer: (D)Given below is an excerpt of an xml specification.
Given below are several possible excerpts from "library.dtd". For which excerpt would the above specification be valid?
<!DOCTYPE library SYSTEM "library.dtd">
<Book>
<title> GATE 2005 </title>
<type value = "BROCHURE"/>
<accno>10237623786</accno>
</Book>
<Book>
<type value = "FICTION"/>
<accno>0024154807</accno>
</Book>Given below are several possible excerpts from "library.dtd". For which excerpt would the above specification be valid?
A. <!ELEMENT Book (title+, type, accno)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT type EMPTY>
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)>
<!ELEMENT accno (#PCDATA)>
B. <!ELEMENT Book (title?, type, accno)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT type ATTLIST>
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)>
<!ATTLIST accno value (#PCDATA)>
C. <!ELEMENT Book (title*, type, accno)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT type ATTLIST>
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)>
<!ELEMENT accno (#PCDATA)>
D. <!ELEMENT Book (title?, type, accno)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT type EMPTY>
<!ATTLIST type value (BROCHURE/FICTION/TECHNICAL)>
<!ELEMENT accno (#PCDATA)>Answer: (D)
The first Book has a title, a type and an accno. The second Book has no title, a type and an accno. So the DTD must allow the title to be missing, and "type" must be declared as an element with only an attribute, that is,
- A:
- B:
- C:
- D:
All four write the attribute values with "/" where a DTD uses "|", so this does not separate them.
Answer: (D)
EMPTY.- A:
title+ needs at least one title, so the second Book is invalid.- B:
<!ELEMENT type ATTLIST> is not a valid declaration (it should be EMPTY), and <!ATTLIST accno value (#PCDATA)> does not declare the element accno and misuses #PCDATA.- C:
title* allows no title, but it also has the invalid type ATTLIST.- D:
title? allows zero or one title, and type EMPTY with an attribute list is correct.All four write the attribute values with "/" where a DTD uses "|", so this does not separate them.
Answer: (D)
Keep practising
Topics in Software Engineering and Web Technology
Software Engineering
Web TechnologyYou are here