Solved - Assessment - Computer Science
Solved - 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.
- We can create pointer variable by using the asterisk (*) sign.
- Directly access the address of another variable using the pointer variable.
- Also modify the value of variable pointer is referring to.
Syntax:
Example of pointer :
// Pointer in cpp
#include<iostream>
*ptr = 20;
return 0;
}
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
Resources
X y
- 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.
<!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>
}
</script>
</div>
</body>
</html>
Question 4: Explain the Agile software development methodology. Discuss its advantages
and how it differs from the traditional Waterfall model.
Answer:
- Requirement analysis
In this phase, requirements are defied, time and cost required to complete the project
is analysed based on business point of view.
- Development
In this phase, actual software development takes place. Actual coding is done in this
phase. Software model is developed, and project is undergoing multiple state
verification.
- Quality assurance
In this phase project undergoes the quality testing and improvement, quality assured
in phis phase. Once stakeholders are satisfied then project is forwarded to deployment
phase.
- Deployment
In this phase team issues the software to work in the user’s environment.
- Feedback
In this phase, users’ feedback and any new requirement is collected.
In waterfall model as name indicates this is a linear method, phases in this method are
irreversible. Once project undergo one phase, we cannot come to that phase again.
In Agile method project is break into smaller parts and worked on each part independently.
Whole project is considered as one product in 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.
Answer:
P0
Given :
Conversions :
Calculations:
= 1000 Mbps / 50