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
Need help with python coding
Ivanshal [37]

Answer:

def= definition

Explanation:

7 0
3 years ago
Read 2 more answers
What is a location where the embedded multimedia terminal is connected to both outside and inside wiring​
anygoal [31]

Answer:

The answer to this question is "The main closet or telecommunications closet".

Explanation:

A multimedia terminal or multimedia terminal adapter (MTA) is also known as a Landline modem that operates just like a wireless router, but in terms of high-speed Internet, an MTA can provide Home Phone service only.

  • In the case of a significant power failure, MTAs have only a backup battery that will fuel the MTA for many hours.
  • This device is used to connect to a main or telecommunications closet.

4 0
3 years ago
Assume that name has been declared suitably for storing names (like "Amy", "Fritz" and "Moustafa"). Assume also that stdin is a
aniked [119]

Answer:

void main(){

string name;

printf("Enter Name\n");

stdin("%s",&name);

Printf("\nGreetings %s",name);

}

Explanation:

Here scanf is represented by stdin and we are using that scanner object to read the string value from user.The value which we read are printed in a new line using printf .The format specifier %s in printf is replaced by name variable

3 0
3 years ago
Who sings you aint nothing but a broke boi
Ad libitum [116K]

Answer:

Kanye West

The song is Gold Digger

6 0
3 years ago
Eric is adding three more slides to his PowerPoint presentation. He knows he wants one of them to have only a large text box, th
marissa [1.9K]

The buttons depend on what version of MS Office he is using. Assuming Eric is using Powerpoint 2013, he must press the following: 

1st Slide: Insert > New Slide > Title Only

2nd Slide: Insert > New Slide > Comparison > Click on "Pictures" icon > Browse > Click selected picture > Insert > Delete text box saying "Click to add title" > Insert another picture using same procedures above > Add captions

3rd slide: Insert > New Slide > Two Content > <span>Click on "Picture" icon > Browse > Click selected picture > Insert 3 more pictures > Click textbox "Click to add title" </span>

3 0
3 years ago
Other questions:
  • Think about a time when someone made a biased judgment about you or acted unfairly toward you because of your age, skin color, c
    6·1 answer
  • ________ sets up a point-to-point connection between two computer systems over an Internet Protocol (IP) network. A. Point-to-Po
    15·1 answer
  • What should the timing of transition slides be per minute?
    9·2 answers
  • Which aspects of a project do project makers oversee?
    12·2 answers
  • The term drive app is used to describe applications stored on a computer true or false
    11·2 answers
  • Please help me!! 10 Points are waiting!!
    8·1 answer
  • Whose job is it to ensure that a group stays focused and on schedule?
    8·1 answer
  • The _____ method randomly rearranges the items in the list provided in the parentheses.
    5·2 answers
  • NWhen you measure a person’s weight, you are measuring the
    15·2 answers
  • What is 11x12x12x14x15x16
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!