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
Lorico [155]
3 years ago
15

Given the char * variables name1, name2, and name3, write a fragment of code that assigns the largest value to the variable max

(assume all three have already been declared and have been assigned values).
Computers and Technology
1 answer:
Assoli18 [71]3 years ago
4 0

Answer:

The following code as follows:

Code:

max=name1;   //define variable max that holds name1 variable value.

if (strcmp(name2, max)>0)  //if block.

{

   max=name2;  //assign value to max.

}

if (strcmp(name3,max)>0)   //if block.

{

  max=name3; //assign value to max.

}

Explanation:

In the above code, we define a variable that is max. The data type of max variable is the same as variables "name1, name2, and name3" that is "char". In the max variable, we assign the value of the name1 variable and use if block statement two times. In if block, we use strcmp() function that can be defined as:

  • In first if block we pass two variables in strcmp() function that is "name2 and max" that compare string value. If the name2 variable is greater then max variable value so, the max variable value is change by name2 variable that is "max=name2".
  • In second if block we pass two variables in strcmp() function that is "name3 and max" that compare string value. If the name3 variable is greater then max variable value so, the max variable value is change by name3 variable that is "max=name3".

You might be interested in
Which sql keyword is used to retrieve a minimum value from an attribute in a table
konstantin123 [22]

The SQL keyword that is often used to retrieve a minimum value from an attribute in a table is the MIN function.

<h3>What is the MIN Function? </h3>

The MIN Function is known to be a group found under Excel Statistical functions.

Note that the MIN often return the minimum value in any list of arguments and as such The SQL keyword that is often used to retrieve a minimum value from an attribute in a table is the MIN function.

Learn more about SQL from

brainly.com/question/25694408

#SPJ11

5 0
2 years ago
Read 2 more answers
Netbooks, also called mini notebooks or subnotebooks, are a subgroup of desktops.<br> True<br> False
UkoKoshka [18]

Answer:

false desktop is on your computer or your actual desk top

Explanation:

4 0
4 years ago
Classify the following skills: communication, creativity, and independence.
MaRussiya [10]

Answer:

Communication, creativity, and independence are people skill

Explanation:

Soft skills depict the quality of a person and classify his/her  personality trait or habit.

Communication - Interpersonal skill

Interpersonal skill allows one to interact and communicate with others effortlessly.

Both soft skill and interpersonal skill comes under the umbrella term i.e people skill.

Hence, communication, creativity, and independence are people skill

8 0
3 years ago
Mark handles the accreditation of applications and systems within his department. He has been told by one of his technicians tha
lorasvet [3.4K]

Answer:

Changes took place

Explanation:

The system changes took place that needs to be re-accredited because, in his department, Mark performs certification of software and computer systems. Some of several specialists have advised him a device needs to be properly-accredited.

So, the system changes have taken place and need to be actually-accredited.

7 0
3 years ago
______ provide visual representations of the options available for a given command
anygoal [31]

The visual representations is provided by the Gallery in the computer system.

Basically, gallery means the collection of pictures in a Computer.

  • Gallery is what enables systematic display and the management of distinct images in the computer.

  • A very good illustration is use of Clipart images. It is a ready made picture gallery available in the computer.

  • Every function on computer are represented with an icon, the icon images are enable through the Gallery.

In conclusion, the Visual representations of the options available for a given command is provided by the Gallery.

Read more about Gallery here

<em>brainly.com/question/2946480</em>

5 0
3 years ago
Other questions:
  • The number of output for a decoder if the input is 4
    14·1 answer
  • Match the web development languages to their type.
    13·1 answer
  • Should software companies be able to send automatic updates to your computer withoput your knowledge
    14·1 answer
  • Jeanne writes a song, and Raul wants to perform
    6·2 answers
  • A _____________ is a method of controlled entry into a facility and provides access to secure areas such as a research lab or da
    6·1 answer
  • What is the best game of 2020 in pc​
    12·2 answers
  • Which of the following statements about federal student loans is true?
    7·1 answer
  • A user complains that her computer is performing slowly. She tells you the problem started about a week ago when new database so
    12·1 answer
  • Complete the function to return the factorial of the parameter using recursion,
    10·2 answers
  • Need the answer ASAP!!! I’ll mark brainliest if correct
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!