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]
3 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]3 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
2. Because technology is always changing, there are new applications being developed constantly. (1 point)
Zepler [3.9K]
True because we need new tech
4 0
3 years ago
Read 2 more answers
A person interested in a career in digital media should have which qualities? Select all that apply.
emmainna [20.7K]
1.Creativity
2.Leadership
3.Attention to detail
5.Enjoyment to learning new things!
6.Vision
No Problem!
5 0
3 years ago
Which of the following is NOT considered an interactive?
joja [24]

Answer: Calendar

Explanation:

Feedback forms, text and social media integration are considered to be interactive. A feedback form is used by an individual or a organization to get a feedback on a certain topic.

A text and social media integration are also interactive as well as the sender and receiver can have an interactive session through both means.

Therefore, the correct option is a calendar as this is not Interactive.

5 0
3 years ago
After Intel faced strong shifts in technologies, such as cloud services, social networking, mobile devices, etc., Intel realized
Crazy boy [7]

Answer:

d. Information governance board

Explanation:

In 2004 <em>Intel </em>was in need of a governance process as part of the company’s policy of <em>Intel’s Information Management (IMM)</em>. Such policies and governance were important in the corporation’s process in order to mirror the local laws as well as to reproduce Intel’s dynamic nature of its activities as a corporation. The <em>Information Governance Boards </em>were intended for every main data area of the company: <em>location, item, finance, customer, supplier, and worker</em>. Such Governance Boards would engage business people in the company to  embrace the stipulated policies also with the purpose of proptecting information.

8 0
3 years ago
What is the output?
Scilla [17]

Answer:

The output of the code,

phrase = "hello mom"

phrase.upper()

Would be nothing since you didnt print out anything. How ever, the output of,

phrase = "hello mom"

print(phrase.upper())

Would be, "HELLO MOM". You can get the same output by writing this,

phrase = "hello mom"

phrase = phrase.upper()

print(phrase)

3 0
3 years ago
Read 2 more answers
Other questions:
  • Net Worth is equal to assets minus liabilities. Which event will have the greatest impact (positive or negative) on one's net wo
    9·1 answer
  • application that will perform a lot of overwrites and deletes of data and requires the latest information to be available anytim
    8·1 answer
  • Artificial intelligence seeks ways to improve a computer's capabilities in ____ and reasoning tasks. intellectual computational
    13·1 answer
  • How do i do a class in java??
    5·1 answer
  • "background" software that helps the computer manage its own internal resources is called ________.
    5·1 answer
  • Jennifer works as a clerk in a company. The essential function of her job is typing on a keyboard. If she develops crippling art
    11·1 answer
  • In 100 words or less, discuss why ethics is especially important for computer professionals, as it pertains to addressing profes
    5·1 answer
  • A small startup company has hired you to harden their new network. Because funds are limited, you have decided to implement a un
    8·1 answer
  • In order to get the maximum functionality out of a device that is plugged in, a user should download the specific ___ for that d
    10·2 answers
  • You are given a graph G = (V, E) with positive edge weights, and a minimum spanning tree T = (V, E’) with respect to these weigh
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!