Web Technologies - Programming Language (MCQ) questions

1)   If you want to align text to the right side of an block element in a cascading style sheet (CSS) then which of the following property would you use?
- Published on 16 Jun 15

a. Right align
b. Justify
c. Left align
d. Text align
Answer  Explanation 

ANSWER: Text align

Explanation:
The text align will be used according to the syntax of CSS.


2)   In a Javascript Application what function can be used to send messages to users requesting for an text input?
- Published on 16 Jun 15

a. Display()
b. Alert()
c. GetOutput()
d. Prompt()
Answer  Explanation 

ANSWER: Prompt()

Explanation:
This function is used when we want to input text in javascript.


3)   What does error 404 or Not Found error while accessing a URL mean?
- Published on 16 Jun 15

a. The server could not find the requested URL
b. Requested HTML file is not available
c. The path to the interpreter of the script is not valid
d. The requested HTML file does not have sufficient permissions
Answer  Explanation 

ANSWER: The server could not find the requested URL

Explanation:
When we send a URL request it sends a request back to us but it may happen that the server may not find that URL that time it sends us error 404 or not found.


4)   Assume that an HTML form is designed to purchase the furniture. All the items required are being checked. After selecting the items the payment details are entered and the submit button is pressed. From the following options which one would you prefer to send the data to the server. Assume that all the security is handled.
- Published on 16 Jun 15

a. Only POST
b. Only GET
c. Either of GET or POST
d. Neither GET nor POST
Answer  Explanation 

ANSWER: Either of GET or POST

Explanation:
For sending the data to the server either of them can be used.


5)   From the following options indicate a correct association of the PROMPT, HEAD and RCPT commands with protocols where they are used?

- Published on 16 Jun 15

a. HTTP, SMTP, FTP
b. FTP, HTTP, SMTP
c. HTTP, FTP, SMTP
d. SMTP, HTTP, FTP
Answer  Explanation 

ANSWER: FTP, HTTP, SMTP

Explanation:
PROMPT- This command is used in FTP
HEAD-used in HTTP asks for the response identical to the one that would correspond to a GET request but without the response body.
RCPT- used by SMTP. It is used to establish the return address or return path.


6)   Which of the following statements are true?
- Published on 16 Jun 15

a. HTTP runs over TCP
b. HTTP allows information to be stored in a URL
c. HTTP can be used to test the validity of a hypertext link
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


7)   Which of the following objects can be used in expression and scriplets in JSP without explicitly declaring them?
- Published on 16 Jun 15

a. Request and response only
b. Response and session only
c. Session and request only
d. Session,request and response
Answer  Explanation 

ANSWER: Session and request only

Explanation:
Implicit objects in JSP are Session: The session object for the client.
Request: the request triggering the execution of the JSP page.


8)   Which of these is a client server application?
- Published on 16 Jun 15

a. Web browsing
b. E-mail
c. Internet Chat
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
In Computer science client-server is a software architecture model consisting of two parts, client systems and server systems, both communicating over a computer network or on the same computer. A client-server application is a distributed system made up of both client and server software.


1