Write a function max that has two c string parameters and returns the larger of the two.

Answers

Answer 1
char max(char number1, char *number2){
if (strcmp(number1, number2) > 0)
return number1;
else
return number2;
}
Answer 2

Final answer:

To determine the larger of two C strings, a function named max uses strcmp to compare them, returning the one considered greater in alphabetical order.

Explanation:

To write a function named max that returns the larger of two C strings, one must compare the two strings alphabetically. Here is an example implementation in C:

#include  // Include the header file for string functions

// Function declaration
const char* max(const char* str1, const char* str2) {
   // Compare the two strings
   int result = strcmp(str1, str2);

   // If str1 is greater than or equal to str2
   if(result >= 0)
       return str1;
   else
       return str2;
}

The strcmp function from the string.h library is used to perform the comparison. If the first string (str1) is greater than or equal to the second string (str2), str1 is returned; otherwise, str2 is returned. Note that the comparison is based on the ASCII values of the characters, effectively ordering them alphabetically.


Related Questions

what is the vaule of 3.85+0.004+0.117 ?

Answers

3.85+0.004+0.117=3.971

How can x2 = x2 + 2x + 9 be set up as a system of equations?

Answers

Final answer:

To set up x^2 = x^2 + 2x + 9 as a system of equations, we would have x^2 = x^2 + 2x + 9 and x = -4.5.

Explanation:

To set up x2 = x2 + 2x + 9 as a system of equations, we can separate it into two separate equations:

Equation 1: x2 = x2 + 2x + 9

Equation 2: 0 = 2x + 9

By rearranging Equation 2, we can rewrite it as:

x = -4.5

Therefore, the system of equations for x2 = x2 + 2x + 9 is: x2 = x2 + 2x + 9 and x = -4.5.

An isosceles trapezoid has bases of 4 and 10. If the base angle is 45°, find the area.

A: 42 sq. units
B: 21√2 sq. units
C: 21 sq. units

Answers

Draw this trapezoid, let it be ABCD, where AB is the smaller base (=4) and
DC, the larger one (=10)
From A & B draw the altitude AA' & BB'. You notice that ABA'B' is a rectangle and A'B' = 4,. You conclude that DA' = B'C = 3 .
Now let's calculate the altitude AA'.
The right triangle ADA' is also an isosceles right triangle:
( angle DA'A=90, angle ADA' = 45 and angle DAA' =45) , then
DA' = AA' (altitude) = 3 units. Now we can calculate the area of the trapezoid:  
 Area = (B+b).H/2

Area = (4+10)x3/2 = 14x3/2 = 42/2 = 21 sq.unit

Answer:

21 sq. units

Step-by-step explanation:

The cost of painting a circular traffic sign is $3.50 per square foot. How much, to the nearest dollar, will it cost to paint the sign if its diameter measures 36 INCHES.

Answers

area of a circle = pi x r^2

using 3.14 for pi

 radius = 36/2 =18

area = 3.14 x 18^2 = 1017.36 square inches

1 sq ft = 144"

1017.36/144 = 7.065 sq ft

7.065*3.50 = $24.73 to the nearest dollar = $25

Can someone help me with this one real quick ? Thanks a lot! Please explain and show your work :)

Answers

a. Given.
You were given the proof.

b. Corresponding angles are congruent.
Since angles 1 and 2 are corresponding, then if one is 130, then the other one is also 130.

c. Vertical angles are congruent.
Angles 2 and 3 are vertical, meaning they'll also be congruent.

d. Transitive Property of Equality.
If angles 2 and 3 are vertical, then if 2 is 130, then 3 is also 130.

A researcher wishes to find out whether giving a student $1 million in cash will improve or ruin the student's grades in school. A high school class consists of the 8 students numbered in the following list. 0 Juanita 1 Tuan 2 Harry 3 Greta 4 William 5 Hiroshi 6 Betty 7 Jane Help the researcher by using the line from a table of random numbers (shown below) to assign 4 of these students to the treatment group. 39661 55832 02589 52612 25414 19879 60880 30641 55259 35324 Which students go in the treatment group?

Answers

Answer:

Greta, Betty, Tuan and Hiroshi

Step-by-step explanation:

Start from the beginning:

3 - Greta

Then, continue with the next numbers:

9 -  skip (there is no student numbered with a 9)

6 - Betty

6 - skip (Betty is already chosen)

1 - Tuan

5 - Hiroshi  

if two triangles share a common side what else must be true for the SAS triangle congruence theorem to apply

Answers

They must share the same angle postion

The conditions to be added are:

The two triangles have congruent angles between the sides that are not the common side.

The two triangles have congruent lengths for the sides adjacent to the congruent angles.

What is a triangle?

A triangle is a 2-D figure with three sides and three angles.

The sum of the angles is 180 degrees.

We can have an obtuse triangle, an acute triangle, or a right triangle.

We have,

The SAS (Side-Angle-Side) triangle congruence theorem states that if two triangles have two sides and the included angle of one triangle is congruent to two sides and the included angle of the other triangle, then the two triangles are congruent.

Therefore, in addition to sharing a common side, the two triangles must have congruent angles between the sides that are not the common side. Specifically, the angle opposite the common side must be congruent in both triangles.

To summarize, for the SAS triangle congruence theorem to apply, the following conditions must be met:

The two triangles share a common side.

The two triangles have congruent angles between the sides that are not the common side.

The two triangles have congruent lengths for the sides adjacent to the congruent angles (the "included" side).

Thus,

The conditions to be added are:

The two triangles have congruent angles between the sides that are not the common side.

The two triangles have congruent lengths for the sides adjacent to the congruent angles.

Learn more about triangles here:

https://brainly.com/question/25950519

#SPJ2

A stick 42 inches long is broken into two pieces, so that one piece is twice as long as the other one. How long are the two pieces ?

Answers

Total length of stick = 42 inches.

Let the shorter piece be x inches.

Thus, the longer piece is 2x.

2x + x = 42

3x = 42

x = 14

Therefore, the length of the two pieces are 14 inches and 28 inches.

The answer is 14 inches and 28 inches:

Total length of stick = 42 inches.

Let the shorter piece be x inches.

Thus, the longer piece is 2x.

2x + x = 42

3x = 42

x = 14

Therefore, the length of the two pieces are 14 inches and 28 inches.

Which of the relations given by the following sets of ordered pairs is a function?
Select one:
a. {
(2,4),(2,6),(2,8),(2,10),(2,12)
(2,4),(2,6),(2,8),(2,10),(2,12)
}
b. {
(−5,−4),(−4,−3),(−3,−2),(−4,−5),(−2,−1)
(−5,−4),(−4,−3),(−3,−2),(−4,−5),(−2,−1)
}
c. {
(0,3),(−6,8),(−3,5),(0,−3),(7,11)
(0,3),(−6,8),(−3,5),(0,−3),(7,11)
}
d. {
(8,1),(−4,1),(3,5),(0,4),(−1,2)
(8,1),(−4,1),(3,5),(0,4),(−1,2)
}

Answers

A function will not have any repeating x values...it can have repeating y values, just not the x ones. SO look at all the x values in ur answer choices...which answer choice has all x values different ?

ur answer would be D....because ur x values (8,-4,3,0,-1) are all different

Since no two different ordered pairs have the same x -coordinate, relations D given by the following sets of ordered pairs is a function.

What is a function?

It is defined as a special type of relationship, and they have a predefined domain and range according to the function every value in the domain is related to exactly one value in the range.

The relation might be put up as a table of ordered pairs. The next step is to determine if each element in the domain matches precisely one element in the range.

A function is a collection of ordered pairs where no two ordered pairs are the same in terms of x-coordinate. A function is defined by an equation that yields such a collection of paired objects.

The relations given by the following sets of ordered pairs is a function is,

d. {(8,1),(−4,1),(3,5),(0,4),(−1,2)(8,1),(−4,1),(3,5),(0,4),(−1,2)}

Thus, no two different ordered pairs have the same x -coordinate, relations D given by the following sets of ordered pairs is a function.

Learn more about the function here:

brainly.com/question/5245372

#SPJ2

Which is the best approximation for the value of √102?
A.10
B.11
C.50
D.51

Answers

10, because when you use a scientific calculator you get 10.09950494
which would be round to 10 because after the decimal the number is 0 below 5 so 10 stays as 10
We know that √100 = 10,
so √102 is approximately 10

There are 26.2 in a marathon .Write the number of miles using a fraction.

Answers

Partitioning the value 26.2

26.2 = 20+6+0.2

The decimal value 0.2 is read two tenth = 2/10

Writing 26.2 as mixed numbers

[tex]26.2=26 \frac{2}{10} [/tex]

If we want to write this as an improper fraction, multiply 26 by 10 then add the 2 to get the numerator

[tex]26.2 = 26 \frac{2}{10}= \frac{262}{10}= \frac{131}{5} [/tex]

what is the greatest integer that satisfies the inequality 3x-4≤8 ?
A.4
B.5
C.6
D.7

Answers

3x - 4 ≤ 8
3x ≤ 12
x ≤ 4

answer

A.4 
To figure this out, we need to solve for the inequality. A quick way is to plug in an answer choice for x.
For example, answer choice "A.)";
3(4) -4 <_ 8
We plugged in 4 for x.
Let's see if A.) is correct.
3(4) -4 <_ 8
12 - 4 <_ 8
8 <_ 8

This is the GREATEST possible integer, as the question asks for what the highest possible number would match the inequality.

Your correct answer choice is "A.)"

I hope this helps!

Suppose you toss a coin 100 times and get 76 heads and 24 tails. based on these​ results, what is the probability that the next flip results in a head​?

Answers

If it is a fair coin, the probability of the next flip resulting in "heads" is 50-50 or .5

 

The probability that the next flip results in a head​ is 50% or 0.5.

We have,

Total number of coins tossed = 100

Number of heads outcome = 76

Number of tails outcome = 24

Now,

The probability of getting heads in the tossing of coins 100 times.

= 76/100

= 0.76

= 76%

Now,

Generally for an unbiased coin.

The probability of getting a head in tossing a coin is 50%.

So,

Based on the results of the first 100 coin tosses, even if the probability of getting a head is 76% the probability that the next flip results in a head is still 50%.

Thus,

The probability that the next flip results in a head​ is 50% or 0.5.

Learn more about probability here:

https://brainly.com/question/14099682

#SPJ5

Find the equation of the line specified.
The slope is 3, and it passes through ( -4, -7).

a.
y =  6x + 5
c.
y =  3x - 7
b.
y =  3x + 5
d.
y =  3x - 19




 

Please select the best answer from the choices provided

A
B
C
D

Answers

If slope is 3 then A answer is wrong for sure, and if the graph passes (-4; -7) point it means that when we put -4 instead of x we should get -7, if you try this method you will get the following answer:

B. y = 3x + 5

Answer:

B

Step-by-step explanation:

Edge 2021

1 oz of walnuts were mixed with 4 oz of peanuts which cost $4/oz to make mixed nuts which cost $5/oz. what is the price per oz of walnuts

Answers

Call w the unknwon price of the walnuts, then:

total cost of walnuts = 1oz *  w

Total cost of peanuts = 4 oz * $4/oz = $16

Total cost of nuts = 5oz * $5 /oz = $25

=> 1oz*w + $16 = $25 => w = ($25 - $16) /1oz = $9/oz

Verfify:

1oz * $9/oz + 4oz * $4/oz = $9 + $16 = $25, which is equal to 5oz * $5/oz.

Answer: $9 per oz.

What is the value of
x/3y, when x = 18 and y = 3?

Answers

assuming ya meant [tex]\frac{x}{3y}[/tex]

x=18 and y=3

[tex]\frac{18}{(3)(3)}=\frac{18}{9}=2[/tex]

this has been asked at least 3 times so far today

 18/3*3 = 18/9 = 2

answer is 2

Generally, how would one work out the surface area of a frustum?

Answers

see the formula in the picture

R is larger diameter, r is smaller diameter

Find the equation of the perpendicular line passing through the midpoint of the line segment connecting (−1, 7) and (2, 3). incorrect: your answer is incorrect.

Answers

eh this is probably correct ?

Let f(x) = 16x5 − 48x4 − 8x3 and g(x) = 8x2. Find f of x over g of x.

Answers

The correct answer is
2x^3-6x^2-x

It is given in the question that

[tex]f(x) = 16x^5 -48x^4-8x^3 \ and \  g(x) = 8x^2[/tex]

And we have to find the value of

[tex]\frac{f(x)}{g(x)}[/tex]

Substituting the values of two functions, we will get

[tex]=\frac{16x^5 -48x^4 -8x^3}{8x^2}[/tex]

8x^3 is common in the numerator, and on taking it out, we will get

[tex]= \frac{8x^3(2x^2 -6x-1)}{8x^2} = x(2x^2 -6x-1)[/tex]

And that's the required answer .

Given the point (5, 6) and the slope of 5, find y when x = 21.

Answers

y=mx+b

6=5(5)+b
6=25+b
-19=b

y=5x-19

y=5(21)-19
y=105-19
y=86

Final answer: y=86

Evaluate the limit lim h → 0 (−5 + h)2 − 25 h

Answers

Easily substitute with h=0 is the limit function:

(-5 + 0)^2 -25(0) = 25 -0 = 25


What is the slope of the line shown below?

Answers

Answer:

correct option is B) 2

Step-by-step explanation:

Slope of line is calculated by formula :-

Suppose two points on line are [tex](x_1, y_1) and (x_2 ,y_2)[/tex] then slope 'm' is [tex]\frac{y_2-y_1}{x_2-x_1}[/tex].

We can see two points on line of graph are :- (-1, -4) and (2,2)

then slope will be calculated as,

[tex]m=\frac{y_2-y_1}{x_2-x_1}[/tex]

since [tex]x_1 = -1, x_2 =2, y_1=-4\;and\; y_2=2[/tex]

now, put in formula

[tex]m=\frac{2-(-4)}{2-(-1)}[/tex]

[tex]m=\frac{2+4}{2+1}[/tex]

[tex]m=\frac{6}{3}[/tex]

[tex]m=2[/tex]

Hence, slope is 2 of the provided graph.

Therefore, correct option is B) 2

Find the area of the triangle with the given measurements. round the solution to the nearest hundredth if necessary. b = 107°, a = 10 cm, c = 22 cm

Answers

Answer:

  105.19 cm²

Step-by-step explanation:

The applicable area formula is ...

  area = (1/2)ac·sin(B) = (1/2)(10)(22)sin(107°) ≈ 105.19 cm²

The standard form of the equation of a parabola is x=y^2+6y+1. What is the vertex form of the equation?
A. X=(y+3)^2-8
B. X=(y+3)^2-5
C. X=(y+6)^2-35

Answers

A. x = (y+3)^2-8 is the correct answer.
What you want to do is get the quadratic (y^2+6y+1) into it's root factor form, in other words, the quantity of (y+what) squared will equal y^2+6y+1. Well it's not a perfect square so we'll have to play around with it a little.
In the format ay^2 + by + c, completing the square first requires finding out what value would do that: c = (b/2)^2 = (6/2)^2 = 3^2 = 9
So we need y^2+6y+1 to have the last number (c) to equal 9 to have (y+b/2)^2, or (y+3)^2
How do we get 9 down to the 1 that we have for c?? 9-1=8, so just subtract 8.
That means that y^2+6y+1 is the same as (y^2+6y+9)-8, and y^2+6y+9 = (y+3)^2, so now we have: y^2+6y+1 = (y+3)^2-8, which is answer [A]

(04.02 LC)

The graph represents function 1 and the equation represents function 2:

Function 2
y = 3x + 1

How much more is the rate of change of function 2 than the rate of change of function 1?
1
2
3
4

Answers

The graph is the horizontal line:

y=3  it has a slope of zero.

Function 2 is

y=3x+1, it is in slope-intercept form, y=mx+b where m is the slope and b is the y=intercept so in this case it has a slope of 3.

So the difference in slopes is 3-0=3
Final answer:

The rate of change of function 2 is 3 times greater than the rate of change of function 1.

Explanation:

The rate of change of a function measures how much the output of the function changes when the input changes by 1 unit. In function 1, since the graph is a straight line, the rate of change is constant. We can find the rate of change of function 1 by finding the slope of the line, which represents the rate of change. In function 2, the equation is y = 3x + 1, so the rate of change is 3. Therefore, the rate of change of function 2 is 3 times greater than the rate of change of function 1.

Learn more about rate of change here:

https://brainly.com/question/29181502

#SPJ3

a gas-filled balloon rises 40 feet in the 1st minute, 60 feet in the 2nd minute, and 80 feet in the 3rd minute, how many feet will the balloon rise during the 15th minute?

Answers

Let [tex]g_n[/tex] represent the number of feet that the balloon rises in the [tex] n^{th} [/tex] minute.

so

[tex]g_1=40[/tex] ft , means that in the 1st minute, the balloon rose 40 feet

[tex]g_2=60[/tex] ft, means : in the 2nd minute the balloon rose 60 feet

[tex]g_3=80[/tex]

we notice that each minute, the balloon rises a multiple of 20, feet:

[tex]g_1=40=2*20[/tex] 

[tex]g_2=60=3*20[/tex] 

[tex]g_3=80=4*20[/tex]

so it is clear that [tex]g_n=(n+1)*20[/tex]

during the 15th minute the balloon rises [tex]g_1_5=16*20=320[/tex](feet)


Answer: 320


Express the sum of 8.79 m and 6.0 m using the correct number of significant digits.

Answers

6.0 has only one digit, the least. Now 8.78 has two, but can't be written as 8,7, one needs to round it to one digit:

8.8 in this cas, so

8.79 + 6.0 = 8.8 + 6.0 = 14.8

14.8 is the answer

Answer:

The sum of the numbers is [tex]8.79+6.0=14.79[/tex]

Step-by-step explanation:

To find : Express the sum of 8.79 m and 6.0 m using the correct number of significant digits.

Solution :

Writing the sum of the numbers according to significant digits by writing in their place value,

 8 . 7 9

+6 . 0 0

----------

14 . 7 9

Therefore, The sum of the numbers is [tex]8.79+6.0=14.79[/tex]

HELPPPPPP make sure your right !:)

Answers

To find your constant of variation, you just need to figure out what you multiply the x by in order to get f(x). In other words, what do you multiply the 3 by to get 6? What do you multiply the 7 by to get 14? Another way to think of it is to divide f(x) by the x to get your constant. 

you invest 2,600 in an account that pays an interest rate of 8.5% compounded continuously. Calculate the balance of your account after 5 years

Answers

The formula is
A=p e^rt
A future value?
P present value 2600
R interest rate 0.085
T time 5years
E constant
A=2,600×e^(0.085×5)
A=3,976.94

Write an equation for each translation of y=lxl

7 units up

Answers

[tex]\bf \qquad \qquad \qquad \qquad \textit{function transformations} \\ \quad \\\\ % left side templates \begin{array}{llll} f(x)=&{{ A}}({{ B}}x+{{ C}})+{{ D}} \\ \quad \\ y=&{{ A}}({{ B}}x+{{ C}})+{{ D}} \\ \quad \\ f(x)=&{{ A}}\sqrt{{{ B}}x+{{ C}}}+{{ D}} \\ \quad \\ f(x)=&{{ A}}(\mathbb{R})^{{{ B}}x+{{ C}}}+{{ D}} \\ \quad \\ f(x)=&{{ A}} sin\left({{ B }}x+{{ C}} \right)+{{ D}} \end{array}\\\\ --------------------\\\\[/tex]

[tex]\bf % template detailing \bullet \textit{ stretches or shrinks horizontally by } {{ A}}\cdot {{ B}}\\\\ \bullet \textit{ flips it upside-down if }{{ A}}\textit{ is negative}\\ \left. \qquad \right. \textit{reflection over the x-axis} \\\\ \bullet \textit{ flips it sideways if }{{ B}}\textit{ is negative}\\ \left. \qquad \right. \textit{reflection over the y-axis}[/tex]

[tex]\bf \bullet \textit{ horizontal shift by }\frac{{{ C}}}{{{ B}}}\\ \left. \qquad \right. if\ \frac{{{ C}}}{{{ B}}}\textit{ is negative, to the right}\\\\ \left. \qquad \right. if\ \frac{{{ C}}}{{{ B}}}\textit{ is positive, to the left}\\\\ \bullet \textit{ vertical shift by }{{ D}}\\ \left. \qquad \right. if\ {{ D}}\textit{ is negative, downwards}\\\\ \left. \qquad \right. if\ {{ D}}\textit{ is positive, upwards}\\\\ \bullet \textit{ period of }\frac{2\pi }{{{ B}}}[/tex]

with that template in mind.. .let's see

[tex]\bf y=|x|\implies \begin{array}{lllcll} y=&1|&1x&+0|+&0\\ &\uparrow&\uparrow &\uparrow &\uparrow \\ &A&B&C&D \end{array}[/tex]

7 units up, meaning D = 7
Other Questions
Divide and state the quotient in simplest form. what is larger 0.0013 or 0.02 In two or more complete sentences, compare the number of x-intercepts in the graph of f(x) = x2 to the number of x-intercepts in the graph of g(x) = -x2 -6. Be sure to include the transformations that occurred between the parent function f(x) and its image g(x). My dear cousin, I didn't do it, and I can't help it. I would, if I could. If low-minded, brutal people will act like themselves, what am I to do? There would be no use in interfering; there is no law that amounts to anything practically, for such a case. (p 187)The excerpt above best demonstrates _____.southern empathyrationalization of slaverynorthern racismquestionable Christianit Bryce collected data about the amount of time each student in history class spends studying. if the range is 1, what does this reveal about the data? What is P(0.6 z 2.12)? Which translation will change figure ABCD to figure A'B'C'D'?A. 7 units left and 6 units upB. 6 units left and 7 units up C. 7 units left and 5 units up D. 5 units left and 7 units up Which are the more common types of solutions? What is the main message of the octet or the first 8 lines in george santayana sonnet 29 Why did many pioneers travel the California Trail after 1848?to find rich farmlandto gain religious freedomto mine for goldto trade with Mexico(I think its C but in don't know) How important is technology in education? what technology-related skills can you contribute to a school district answers? help which statement is true Use long division to convert -45/8 to a decimal.A. -5.625B. -6.252C. 5.625D. 6.252 What is the rea of a circule with a radious of 3 meters use 3.14 10 common diseases that can cause a secondary immunodeficiency Gps receivers are commonly used by individuals to determine their geographic location while hiking and to obtain driving directions while traveling. a. True b. False 3. As of November 2012, how many states had laws prohibiting racial profiling by law enforcement officers? Which of the following is a lower body stretch , biceps curl, Arm circle, Quadriceps stretch, Trunk twist Could someone confirm my answers from this practice booklet test so I can feel confident about the upcoming AP Java exam? I am not the best with java terms especially when the booklet doesn't recite any types of definitions or properties.A constructor (with no arguments) and a body that is empty or provides values for the class instance variables by the programmer is an example ofA Default Constructor (my choice)An Inherited Constructor Instantiating a Constructor Overloading Constructors Overriding ConstructorsA public class method may be invoked after which of the following occurs?The class is defined. (my choice)The main method is defined. All instance variables are assigned. An instance of the class is created. The instance methods are invoked. Financial barriers to healthcare are a huge concern to people around the world. describe three (3) organizations who provide financial assistance to healthcare. ati Steam Workshop Downloader