Graphics And Rendering(Javascript ) Questions and Answers

Question 1. Which of the following are not the properties of a canvas object?
  1.    fillStyle
  2.    strokeStyle
  3.    lineWidth
  4.    lineSize
Explanation:-
Answer: Option D. -> lineSize
There is no property called lineSize associated with the canvas object.

Question 2. Which is the method invoked to connect the last vertex back to the first?
  1.    closePath()
  2.    close()
  3.    connectlast(first)
  4.    none of the mentioned
Explanation:-
Answer: Option A. -> closePath()
The closePath() method connects the last vertex back to the first, thereby creating a path.

Question 3. Which of the following is a property used to check how crisp or fuzzy shadows are?
  1.    shadowColor
  2.    shadowBlur
  3.    strokeStyle
  4.    none of the mentioned
Explanation:-
Answer: Option B. -> shadowBlur
shadowBlur is used to check how crisp or fuzzy shadows are.

Question 4. Which is the method invoked to begin a path?
  1.    begin()
  2.    path()
  3.    createPath()
  4.    beginPath()
Explanation:-
Answer: Option D. -> beginPath()
The beginPath() is used to begin a new path.

Question 5. How do you restore a saved coordinate system?
  1.    restore()
  2.    getback()
  3.    set()
  4.    none of the mentioned
Explanation:-
Answer: Option A. -> restore()
The saved coordinate system is restored by calling the method restore() associated with the canvas object.

Question 6. Which layer is used to handle the network addressing and routing?
  1.    Network Access Layer
  2.    Internet Layer
  3.    Transport Layer
  4.    Presentation Layer
Explanation:-
Answer: Option B. -> Internet Layer
The Internet layer handles network addressing and routing, getting IP and MAC addresses.

Question 7. The layer in which the TCP (or UDP) communication takes place is
  1.    Network Access Layer
  2.    Internet Layer
  3.    Transport Layer
  4.    Presentation Layer
Explanation:-
Answer: Option C. -> Transport Layer
The Transport layer is where our TCP (or UDP) communication takes place.

Question 8. What are the various possessions in the three-way handshake by the TCP?
  1.    Synchronize
  2.    Synchronize-Acknowledge
  3.    Acknowledge message
  4.    All of the mentioned
Explanation:-
Answer: Option D. -> All of the mentioned
This handshake consists of a Synchronize, Synchronize-Acknowledge, and Acknowledge message to be passed between the browser and the remote server. This handshake allows the client to attempt communication, the server to acknowledge and accept the attempt, and the client to acknowledge that the attempt has been accepted.

Question 9. Arrange the TCP/IP model layers in the order from furthest to closest to the end user.
  1.    Network Access Layer, Internet Layer, Application Layer, Transport Layer
  2.    Network Access Layer, Transport Layer, Internet Layer, Application Layer
  3.    Network Access Layer, Internet Layer, Transport Layer, Application Layer
  4.    Network Access Layer, Application Layer, Internet Layer, Transport Layer
Explanation:-
Answer: Option C. -> Network Access Layer, Internet Layer, Transport Layer, Application Layer
The four layers in the TCP/IP model are, in order from furthest to closest to the end user, the Network Access layer, the Internet layer, the Transport layer, and the Application layer.

Question 10. Which layer handles the top-level communication?
  1.    Network Access Layer
  2.    Internet Layer
  3.    Transport Layer
  4.    Application Layer
Explanation:-
Answer: Option D. -> Application Layer
The Application layer handles the top-level communication that the client and servers use, like HTTP and SMTP for email clients.