Assessment - Computer Science
Assessment - Computer Science
Question 1: Explain the concept of pointers in C++. Provide a program example of how
pointers can be used to manipulate data and access memory locations.
Answer:
Pointers in cpp is nothing but the special type of variable which stores memory
address of other variables.
Example of pointer :
Answer:
Deadlock is a situation in which one or more processes are holding resources and waiting for
another resource which may cause system failure.
A B Processes
Holds
Holds
Request Request
X y
Resources
- Here in above example process A is holding resource x and waiting for the resource y,
while at the same time the process B holds the resource y and requests for resource x.
- In above situation process need an access to the requested resource to execute.
- But no one of them is willing to relieve the resource acquired by them.
- This situation leads to a deadlock.
Question 3: Create a simple HTML page with a form that includes input fields for name,
email, and a submit button. On submitting the form, display a message showing the entered
information.
Answer:
<!DOCTYPE html>
<html >
<head>
<title>Straive Assignment</title>
</head>
<body>
<div class="straiveAssignmet">
<form action="">
<!-- input fields for entering name and email values -->
<label for="Name">Enter your name:</label>
<input type="text" id="name">
<br> <br>
<label for="email">Enter your email: </label>
<input type="email" id="email">
<br> <br>
<input type="button" value="Submit" onclick="straiveFunction()">
<!-- paragraph where we display information -->
<p id="spn1"></p>
<p id="spn2"></p>
</form>
</body>
</html>
Question 4: Explain the Agile software development methodology. Discuss its advantages
and how it differs from the traditional Waterfall model.
Question 5: A network has a total bandwidth of 1 Gbps (Gigabit per second). If the network
is shared among 50 users, calculate the maximum data rate (in Mbps) that each user can
achieve if they are all using the network simultaneously.