Answer:
a. Maximum size of file = 8.003 GB
Explanation:
<u>a. Maximum size of file</u>
= (6 * 2 KB) + (2048 * 2 KB) + (2048 * 2048 * 2 KB)
= 12kb + 4096 Kb + 8388608 kb
= 8392716 kb
8392716/1024 mb = 8196.01 MB
8196.01 /1024 GB= 8.003 GB
<u>b. According to above calculation</u>
For 8 GB 6 direct, 1 single and 1 double indirect block requires
so
for 32 GB
24 direct Block
4 single and 4 double indirect block requires
1.)
<span>((i <= n) && (a[i] == 0)) || (((i >= n) && (a[i-1] == 0))) </span>
<span>The expression will be true IF the first part is true, or if the first part is false and the second part is true. This is because || uses "short circuit" evaluation. If the first term is true, then the second term is *never even evaluated*. </span>
<span>For || the expression is true if *either* part is true, and for && the expression is true only if *both* parts are true. </span>
<span>a.) (i <= n) || (i >= n) </span>
<span>This means that either, or both, of these terms is true. This isn't sufficient to make the original term true. </span>
<span>b.) (a[i] == 0) && (a[i-1] == 0) </span>
<span>This means that both of these terms are true. We substitute. </span>
<span>((i <= n) && true) || (((i >= n) && true)) </span>
<span>Remember that && is true only if both parts are true. So if you have x && true, then the truth depends entirely on x. Thus x && true is the same as just x. The above predicate reduces to: </span>
<span>(i <= n) || (i >= n) </span>
<span>This is clearly always true. </span>
Answer:
The code for the function is given below in Python language
Explanation:
def append_string_to_file(filename, text):// function takes the filename // and text to append
f = open(filename, 'a')
f.write(text) //function part that writes the text
f.close() //closing the file using the explicit close function
Just try to answer some questions as well, then you can keep a nice balance.
ps. Only answer the questions you know.
Answer : The securtiy of the password can be maitained by the shadow files such as:-
- max is for the days that represent that the same password can be used without the need for changing it
- min is for the days that represent waiting days before the changing of password after he/she gets a new password
- warn are the days that come with Waring sign that the password is going to expire soon.
For a certain period of time , the user can access the log in when the password has expired . If that period is timed out then there will be no log in option and the account gets disabled.