0% found this document useful (0 votes)
1 views19 pages

AnswerKey-Assignments12345-IMADSep2016

The document contains answer keys for five assignments related to web applications, networking, databases, and security. Each assignment includes multiple-choice questions covering various topics such as web app definitions, HTML, IP addresses, SQL, and web server functionalities. The answers provided are intended to guide students in understanding key concepts in these areas.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views19 pages

AnswerKey-Assignments12345-IMADSep2016

The document contains answer keys for five assignments related to web applications, networking, databases, and security. Each assignment includes multiple-choice questions covering various topics such as web app definitions, HTML, IP addresses, SQL, and web server functionalities. The answers provided are intended to guide students in understanding key concepts in these areas.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Answer Key - Assignments 1/2/3/4/5

IMAD Sep-2016
Assignment 1
What is a webapp?
Javascript is used for:
A modern browser can
Select those options below which are web clients
What is the purpose of a URL
In the URL: https://mail.google.com/u/0/inbox what part of the URL, is the hostname?
What is a definition of a web-server
Can a browser make a request to a server without a domain name?
Choose the correct statement(s):
What is/are the benefit(s) of dedicated hosting over shared hosting?
As a webapp developer which parts of your application can you completely control:
Chrome Dev Tools can be used for:
abc.com and abc.in
What is a definition of deployment?
A browser is a software that can be installed on
Which of the following can act as a web server host?
What are the factors that affect the performance of a webapp?
Choose the correct statement(s):
How many image requests are made to the server when the page
https://www.iitm.ac.in/ is loaded
What is the URL of the IIT Madras logo on the top left corner on the page
https://www.iitm.ac.in/:
Assignment 2
Which of the below IPs is/are valid?
What protocol/protocols does the ‘ping’ command use?
For a web page, HTML represents the:
What is the ‘ping’ command useful for?
SSH is used for:
If ‘http-server’ is run, and outputs the ‘EADDR IN USE 8080’ error. It can mean:
How many ports does a computer have?
What is the IP of www.squ.edu.om
How can one SSH to a server on the cloud
What does server side templating refer to
Where is the website www.unimelb.edu.au (University of Melbourne) hosted?
What is the main reason the internet is moving towards ipv6?
Which of the following is/are valid HTML syntax
Which of the following statements are correct:
Which of the following statements are correct:
Which of the following are valid examples of css selectors
Which HTML tag is used to create a hyperlink
Which of the following is/are valid HTTP request methods
Which of the following statements is/are correct
Opening www.abc.com on a browser fetches
Assignment 3
Which SQL statement is used to update a database table schema?
Database normalisation typically
A SQL database view
Which of the following are SQL aggregate functions?
In a typical master/slave database system
A database index
Which of the following will help when a database begins to become too large to
keep on one system
Which of the following code will create an index named stu_sub_ind on the columns
roll_num and subject of the student_subjects table?
Which of the following will typically improve database write times
For table CUSTOMERS
Assignment 4
What properties of hash functions are necessary when used for hashing passwords?
How many cookies can you save for your webapp on a browser?
Which of these are good places to keep your web app’s database credentials?
XSS exploits vulnerability in the
Which of the following security attacks are caused due to not sanitizing user input
carefully
A web app and a native mobile app can share the same
What is essential to ensure data is sent securely over the network to the right server
Which of the following are almost completely under a developer’s control for a
webapp
Which protocols’ headers are used for web app session management?
Which of these is a good candidate for a user’s session-id
Assignment 5
What is a CDN?
Which statement(s) is/are true:
What can a server send as response when a browser demands a .html file
Which protocol’s job is it to transport a packet to its destination computer over the
internet
Which of the following is invalid CSS selector syntax
Which of the following can affect the usage of cookies
Which of the following methods of scaling a DB don’t require more than one
database server instance to improve performance:
What is the difference between class and id in HTML
Which of the following is invalid SQL statement where there is table name called
user with a column username
Which of the following statement(s) is/are true
Assignment 1
1. What is a webapp?
a. It is a software which lets you access websites
b. It is a software you can use in a web browser
c. It is a software you can download from the web
d. It is a software used to build websites

2. Javascript is used for:


a. Describing the content on the web page
b. Making a webpage interactive
c. Describing styling (like colour and font size) of content on the webpage
d. Loading dynamic content on a webpage

3. A modern browser can


a. Render HTML
b. Execute code
c. Make requests for content through the network
d. Display files on the computer it is installed on

4. Select those options below which are web clients


a. Google Chrome
b. www.google.com
c. Firefox
d. www.gmail.com

5. What is the purpose of a URL


a. To represent the server a client wants to make a request to
b. To identify the resource a client wants to make a request to
c. To help the network find the fastest route to the server
d. None of the above
6. In the URL: https://mail.google.com/u/0/inbox what part of the URL, is
the hostname?
a. google.com
b. mail.google.com
c. mail
d. /u/0/inbox

7. What is a definition of a web-server


a. A software that can listen to requests and respond to them
b. A network component that helps route requests from clients to servers
c. A software for users to browse the Internet
d. A computer with access to the web

8. Can a browser make a request to a server without a domain name?


a. Yes
b. No
It can use the IP or a hostname (which does not have to be a domain name. Ex:
localhost)

9. Choose the correct statement(s):


a. The browser makes a request to a DNS server, the DNS server makes a request
to the web server, the webserver responds to the browser
b. The browser does a DNS lookup, and after that the browser contacts the web
server using the IP
c. The browser does not need an IP to contact the server
d. None of the above

10.What is/are the benefit(s) of dedicated hosting over shared hosting?


a. It is typically cheaper
b. It has better performance
c. It typically comes with a dedicated IP
d. It offers users more control over their server
11. As a webapp developer which parts of your application can you
completely control:
a. The speed with which your webapp loads for a user
b. The requests your webapp will receive
c. The language and framework the webapp is built on
d. The hardware configuration of the server

12. Chrome Dev Tools can be used for:


a. Analysing requests and responses made when a webpage loads
b. Modifying the rendered HTML on the browser
c. Modifying the source code of the web server
d. Checking how the webpage would look on a tablet

13. abc.com and abc.in


a. Have the same domain name
b. Are different resources of the same webapp
c. Have the same application owner
d. None of the above

14. What is a definition of deployment?


a. Writing source code of your web server
b. Installing your web server and application code on your hosting provider (or
server hardware)
c. Buying a domain name
d. None of the above

15. A browser is a software that can be installed on


a. Desktops
b. Tablets
c. Smartphones
d. Smart TVs
Any device with sufficient hardware and an operating system can run browser software.
Most modern electronics have Operating Systems and hardware powerful enough to
run browsers.
16. Which of the following can act as a web server host?
a. Your laptop
b. A virtual computer on the cloud (like AWS)
c. Your smartphone
d. Your TV
Any device with sufficient hardware and an Operating System (and associated tools)
that allows developers to write and install software can run a webserver.

17. What are the factors that affect the performance of a webapp?
a. The computer configuration of the user using the webapp
b. The browser used to open the webapp
c. The quality of the network between the client and the server
d. The hardware configuration of the server

18. Choose the correct statement(s):


a. For the same configuration, dedicated hosting has better performance than
cloud hosting
b. The same computer can be a client and a server
c. A smart watch can have applications which are web clients
d. Because DNS is a global system, to register a domain name one should register
it with all registrars in the world

19. How many image requests are made to the server when the page
https://www.iitm.ac.in/ is loaded
a. 0-10
b. 10-20
c. 20-30
d. 30-40
Use Chrome Dev Tools (by right-clicking on the iitm.ac.in page and clicking on inspect)
and refresh the page. Record the number of requests made on the network tab.

20. What is the URL of the IIT Madras logo on the top left corner on
the page https://www.iitm.ac.in/:
a. xxx/logo.jpg
b. xxx/logo120.jpg
c. xxx/iitmlogo120.png
d. xxx/iitmlogo.png
Use Chrome Dev Tools (by right-clicking on the iitm.ac.in page and clicking on inspect).
Right click on the log on the top left corner and view the HTML element. Look at the
HTML element or the CSS attributes of an HTML element to see what image it is
loading. Alternatively, right-click on the logo and click on ‘Open Image In New Tab’ and
check the URL that is loaded for the image.

Assignment 2
1. Which of the below IPs is/are valid?
a. 23.54.23.21.32
b. 123.132.212.32
c. 234.11.265.34
d. 3ffe:1900:4545:3:200:f8ff:fe21:67cf

2. What protocol/protocols does the ‘ping’ command use?


a. HTTP/HTTPS
b. ICMP
c. TCP
d. IP

3. For a web page, HTML represents the:


a. Structure of web page content
b. Styling of web page content
c. Animations of web page content
d. Web page address

4. What is the ‘ping’ command useful for?


a. checking network latency to the server
b. resolving hostname to an IP
c. checking the network route to the server
d. checking network connectivity of your host

5. SSH is used for:


a. writing a web server
b. accessing a remote computer
c. making http requests to a web server
d. checking network path to a remote computer

6. If ‘http-server’ is run, and outputs the ‘EADDR IN USE 8080’ error. It


can mean:
a. There is an error in the web server code
b. The server is trying to run on an invalid port
c. The server is trying to run on a port blocked by another server
d. The server is trying to running on an URL address already in use

7. How many ports does a computer have?


a. 16
b. 80
c. 8080
d. 65536
A simple google query will give you this answer

8. What is the IP of www.squ.edu.om


a. 62.231.24.11
b. 62.231.24.121
c. 62.231.244.11
d. 62.231.244.121
Use ping to check the IP of www.squ.edu.com

9. How can one SSH to a server on the cloud


a. using private IP of server
b. using loopback IP of server
c. using public IP of server
d. using hostname of server

10.What does server side templating refer to


a. Sending the data from the server to a client so that the client can use the data to
create the UI
b. Sending the UI files from the server to the client so that the client can render the
UI
c. Rendering the UI on the server so that the client can display the UI
d. Creating the UI markup dynamically on the server so that the client can
render the UI

11. Where is the website www.unimelb.edu.au (University of Melbourne)


hosted?
a. USA
b. Hong Kong
c. Australia
d. Singapore

12. What is the main reason the internet is moving towards ipv6?
a. Ipv4 is slower
b. Ipv4 is expensive
c. Ipv4 addresses will run out
d. Ipv4 is not as secure

13. Which of the following is/are valid HTML syntax


a. <html> <body></body><div>Hello world!</div></html>
b. <html> <body><div>Hello world!</div></body></html>
c. <html> <body><div>Hello world!</body></html>
d. <html> <body><div>Hello world!</body></div></html>

14. Which of the following statements are correct:


a. HTTPS ensures delivery of all data packets while HTTP does not
b. HTTPS encrypts the data in packets for security while HTTP does not
c. HTTPS requires a security certificate while HTTP does not
d. By default, HTTPS runs on port 443 while HTTP runs on port 8080

15. Which of the following statements are correct:


a. localhost and 127.0.0.1 both link to the loopback network interface
b. 127.0.0.1 requires connection to a network while localhost does not
c. localhost needs a DNS lookup while 127.0.0.1 does not
d. There is no difference between localhost and 127.0.0.1
16. Which of the following are valid examples of css selectors
a. div
b. .element
c. _div
d. #element

17. Which HTML tag is used to create a hyperlink


a. <hr>
b. <href>
c. <link>
d. <a>

18. Which of the following is/are valid HTTP request methods


a. GET
b. SEND
c. DELETE
d. POST

19. Which of the following statements is/are correct


a. JS can modify HTML
b. HTML can modify JS
c. CSS can modify HTML
d. HTML can modify CSS

20. Opening www.abc.com on a browser fetches


a. The index.html file on the server
b. The resource mapped to path ‘/’ on the server
c. The resource mapped to path ‘/abc on the server
d. We cannot be sure
Assignment 3
1. Which SQL statement is used to update a database table schema?
a. UPDATE TABLE
b. MODIFY TABLE
c. ALTER TABLE
d. CHANGE TABLE

2. Database normalisation typically


a. Reduces number of tables
b. Reduces database size
c. Reduces data constraints
d. Reduces chances of data anomalies

3. A SQL database view


a. Contains data not stored in the database tables
b. Is computed using a SQL query
c. Takes up more disk space whenever more data is added to the database
d. Is a way to improve the read time of a table in a database

4. Which of the following are SQL aggregate functions?


a. MIN
b. AVG
c. SELECT
d. JOIN

5. In a typical master/slave database system


a. Writes can be made on the slave
b. Reads can be made on the slave
c. Writes can be made on the master
d. Reads can be made on the master
6. A database index
a. Increases database size
b. Decreases database size
c. Doesn’t affect database size
d. Impacts database size differently in different cases

7. Which of the following will help when a database begins to become


too large to keep on one system
a. Setting up a slave database
b. Sharding database
c. Archiving data
d. Setting up daily database dump

8. Which of the following code will create an index named stu_sub_ind


on the columns roll_num and subject of the student_subjects table?
a. create index stu_sub_ind from student_subjects(roll_num, subject);
b. create index stu_sub_ind on student_subjects(roll_num, subject);
c. create index stu_sub_ind (roll_num, subject) on student_subjects;
d. It’s not possible to create an index on two columns

9. Which of the following will typically improve database write times


a. Using a hard disk with faster write speeds
b. Normalising data to reduce amount of data to be written
c. Using transactions for every database operation
d. Removing unnecessary constraints
10.For table CUSTOMERS
+--- -+----------+-----+-----------+----------+
| ID | NAME | AGE | ADDRESS | SALARY |
+----+----------+-----+-----------+----------+
| 1 | Ramesh | 32 | Ahmedabad | 2000.00 |
| 2 | Khilan | 25 | Delhi | 1500.00 |
| 3 | kaushik | 23 | Kota | 2000.00 |
| 4 | Chaitali | 25 | Mumbai | 6500.00 |
| 5 | Hardik | 27 | Bhopal | 8500.00 |
| 6 | Komal | 22 | MP | 4500.00 |
| 7 | Muffy | 24 | Indore | 10000.00 |
+----+----------+-----+-----------+----------+

The query SELECT ID FROM CUSTOMERS WHERE SALARY > 5000 OR age < 25; will
produce result
a. 3 4 5 6 7
b. 6 7
c. 3 4 5
d. 1 2 3 4 5 6 7
Assignment 4
1. What properties of hash functions are necessary when used for
hashing passwords?
a. It converts string of any length to a string of fixed length
b. It converts any string to the same random string each time
c. It is not possible to recover the original string from its hashed value
d. The chance of two strings giving the same hash value is very low

2. How many cookies can you save for your webapp on a browser?
a. 1
b. 2
c. 50
d. Depends on the browser

3. Which of these are good places to keep your web app’s database
credentials?
a. In a separate file in your source code
b. In a separate file on your web server host
c. In your database
d. None. The database credentials should never be stored

4. XSS exploits vulnerability in the


a. network
b. browser
c. app source code
d. web server host

5. Which of the following security attacks are caused due to not


sanitizing user input carefully
a. DDOS
b. XSS
c. SQL injection
d. Man in the middle
6. A web app and a native mobile app can share the same
a. HTML + CSS
b. API for fetching data
c. Web server
d. None of the above

7. What is essential to ensure data is sent securely over the network to


the right server
a. Using HTTPS protocol
b. Having an authentication token
c. Server SSL certificate verification
d. Using hash functions

8. Which of the following are almost completely under a developer’s


control for a webapp
a. Network security
b. Browser security
c. Database security
d. Server host security

9. Which protocols’ headers are used for web app session


management?
a. TCP
b. IP
c. HTTP
d. HTTPS

10.Which of these is a good candidate for a user’s session-id


a. User’s password
b. User’s hashed password
c. A fixed random string saved in the user database
d. A newly generated random string every time the user logs in
Assignment 5
1. What is a CDN?
a. Globally distributed set of servers to speed up delivery of content to clients
b. A hosting solution for webapps to host apps that experience a lot of scale
c. A browser add-on that loads webpages faster
d. A new type of Internet connection (like broadband) that is faster for content
delivery

2. Which statement(s) is/are true:


a. Apps can only be built with APIs built by the same developer
b. Apps can use web APIs written by other organizations provided they have
authentication/authorization to use them
c. Web apps can use APIs but mobile apps can’t
d. Web and mobile apps are just clients and can consume APIs just like any
other client

3. What can a server send as response when a browser demands a


.html file
a. An image
b. JSON
c. HTML
d. Plain text

4. Which protocol’s job is it to transport a packet to its destination


computer over the internet
a. TCP
b. HTTP
c. IP
d. FTP

5. Which of the following is invalid CSS selector syntax


a. #elem
b. .elem + div
c. .elem:hover
d. .elem ^ div

6. Which of the following can affect the usage of cookies


a. Network
b. Browser
c. Web app server machine
d. Web app source code

7. Which of the following methods of scaling a DB don’t require more


than one database server instance to improve performance:
a. Sharding
b. Setting up reads from slave dbs
c. Indexing
d. Increasing host RAM

8. What is the difference between class and id in HTML


a. id is used as selector in JS while class is used in css
b. id is used as selector in css while class is used in JS
c. id is unique to a single element on a webpage while class can be shared by
various HTML elements
d. They are basically the same thing

9. Which of the following is invalid SQL statement where there is table


name called user with a column username
a. SELECT * FROM user
b. SELECT COLUMNS username from USER
c. DELETE FROM user WHERE username = ‘ramu’
d. DELETE user

10.Which of the following statement(s) is/are true


a. The main feature provided by cloud hosting providers is elasticity
b. Dedicated hosting can provide higher performance because of exclusive
access to resources
c. Shared hosting is one of the cheapest forms of hosting
d. VPS hosting is convenient for hosting users because users feel like they are
getting exclusive access to a computer (a virtual machine)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy