1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dominik [7]
2 years ago
6

In the following shell scripting extract, the initial values of variables s, c and p are 0, 1, 1 respectively. What will be the

final value of s, at the end of the while loop?

Computers and Technology
1 answer:
____ [38]2 years ago
3 0

Answer:

The first example simply counts the number of lines in an input file. It does so by iterating over all lines of a file using a while loop, performing a read operation in the loop header. While there is a line to process, the loop body will be executed in this case simply increasing a counter by ((counter++)). Additionally the current line is written into a file, whose name is specified by the variable file, by echoing the value of the variable line and redirecting the standard output of the variable to $file. the current line to file. The latter is not needed for the line count, of course, but demonstrates how to check for success of an operation: the special variable $? will contain the return code from the previous command (the redirected echo). By Unix convention, success is indicated by a return code of 0, all other values are error code with application specific meaning.

Another important issue to consider is that the integer variable, over which iteration is performed should always count down so that the analysis can find a bound. This might require some restructuring of the code, as in the following example, where an explicit counter z is introduced for this purpose. After the loop, the line count and the contents of the last line are printed, using echo. Of course, there is a Linux command that already implements line-count functionality: wc (for word-count) prints, when called with option -l, the number of lines in the file. We use this to check wether our line count is correct, demonstrating numeric operations on the way.

You might be interested in
____ policy establishes criteria for classifying and securing the organization's information in a manner appropriate to its leve
pav-90 [236]

Answer:

Correct Answer is (d) Information sensitivity policy

Explanation:

Information sensitivity policy establishes the criteria for classifying and securing the organization's information in a manner that is appropriate to its level of security.

However, other options are incorrect. Server security can be established only on servers and on information/data that is in the server from unauthorized access. While VPN security is used for protecting network and encryption is used to encrypt data from illegal access.

However, only information sensitivity policy is used for classifying and securing organization information to the outside world.

The intention of information sensitivity policy:

The intention of using any information sensitivity policy is to help the employee to determine what information can be disclosed to non-employee, as well as the relative sensitivity of the information that should not be disclosed outside of the company without proper permission or authorization from supreme leadership of an organization.

7 0
3 years ago
Which of the following was not important in the development of the internet?
lesantik [10]
D. Rise of NASA.Hope I helped.
8 0
3 years ago
Read 2 more answers
Anu wishes to prepare a program to display the value of numbers from 1 to 25. The program that Anu prepared is given below. Ther
sergiy2304 [10]

Answer:

Programming is a set of instructions i.e. Input given by the user to the computer to perform a particular task and give the desired result i.e. output.

Final Answer

‌s=0

for i in range(1,26):

s=s+ i

print(s)

Explanation:

IF THE ANSWER IS CORRECT THEN MARK A BRAINLEST

5 0
3 years ago
Read 2 more answers
In a linux script, the line ____ is important because it identifies the file as a script.
igor_vitrenko [27]
The closest line to that would be the first line:


#!/bin/bash

echo "Hello World!"


BTW, the "#!" is referred to as a she-bang. When those are the first characters executed, the (requires an absolute path) program that follows is launched, and the rest of this file is given to it as data. To run this like a program, the execute permissions need to be set ( chmod 0755 script.sh ).
8 0
2 years ago
Briefly describe the working of computer processing system?
liberstina [14]

Answer:

<em>The Processor</em>

<em>The central processing unit (CPU) guides the computer through the various steps of solving a problem. Data enters the computer through an input unit, is processed by the central processing unit, and is then made available to the user through an output unit.</em>

<em>ExplanationExplanationExplanation:</em>

<em />

5 0
2 years ago
Other questions:
  • How can website illustrate cooperations and kidness?
    8·1 answer
  • A powerpoint ________ is a set of unified design elements.
    5·1 answer
  • You change a document that is saved on your computer by cutting text from the document what happens to the text when you preform
    5·1 answer
  • Users of Adobe Reader, created by Adobe Systems Incorporated, are prompted to provide feedback on their experiences with the sof
    7·1 answer
  • What is malware? a type of virus that spreads through a network connection a type of virus that targets programs and files any p
    12·1 answer
  • a. Fill in the blanks with suitable words: A software that controls and manages all the activities of the computer ... b. A soft
    13·1 answer
  • Which bug type would you suggest for the following bug? The button label "Add to cart" is not fully visible.
    5·1 answer
  • What techniques overcome resistance and improve the credibility of a product? Check all that apply.
    8·1 answer
  • Please help me please please
    14·2 answers
  • In large organizations, database design and management is handled by a database _____.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!