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
kykrilka [37]
2 years ago
10

Whats the flow in this code, and whats the risk that its creating and what can i do to fix it? (c language)

Computers and Technology
1 answer:
Advocard [28]2 years ago
6 0

Answer:

The risk is a buffer overflow.

Explanation:

Whatever the user passes as a command line argument, will be copied into the buffer. If the user passes more than 499 characters, the end of the buffer will be overwritten.

To solve it, compare the string length of argv[1] to 500 before copying, or even better, start using the new strcpy_s( ) function.

You might be interested in
How will technology help people with disabilities become more transportation independent?.
lilavasa [31]

Technology will help people with disabilities become more transportation independent: Automated vehicles will be developed.

<h3>What is technology?</h3>

Technology refers to a science or knowledge, developed practically so that they can be used to solve problems. Technology help individuals and organizations be more innovative, effective, efficient and productive.

With regards to the above, the advent of technology would enable people with disability become more transportation independent when automated vehicles are developed.

Hence, technology will help people with disabilities become more transportation independent when Automated vehicles are developed.

Learn more about technology here : brainly.com/question/5043267

7 0
2 years ago
Which elements are in the Sort dialog box? Check all that apply.
Yuliya22 [10]

Answer:

Categories

date

From

Show in Groups

type

Explanation: Just took the test!!!

5 0
3 years ago
The Internet of Things (IoT) is a concept with emphasis on machine-to-machine communications to describe a more complex system t
VLD [36.1K]

Answer:

IoE(Information of Everything)  is the correct answer to the following question.

Explanation:

The following answer is correct because it is the concept that process, data, people and also Internet of Things brings together by which the network connection become more valuable and more compatible as compared to before and also it can extend the IoT(Internet of Things).

So, that's why the following answer is correct.

8 0
3 years ago
Overlay analysis is ____________, taking in data from two or more layers to create a single output layer.
Wewaii [24]

Explanation:

Overlay analysis is an approach, taking in data from two or more layers to create a single output layer.

For example, if we have a layer of land use and a layer of soil fertility, we can derive from the two layers the percentage of agricultural land developed over fertile soil.

6 0
3 years ago
You are training to complete in a local 5K run. You record your time scores in minutes after completing seven practice runs. Wri
trapecia [35]

Answer:

Following are the program to this question:

#include <iostream>//defining header file

using namespace std;

float Avg(float sum, int n)//defining method Avg that accepts float parameter

{

float average=sum/n;//defining float variable average that holds average value  

return average;//return average

}

int main()//defining main method

{

float ar[ ] = {24.1,24.5,24.4,23.8,28.2,29.1,27.4};//defining float array

float sum;//defining float variable sum

int n=7,i;//defining integer variable  

for (i = 0; i <n; i++)//defining loop to count total of array

{

sum=sum+ar[i];//add value in sum variable

}

cout<<"The average is: "<<Avg(sum,n);//use print method to call and print method return value

return 0;

}

Output:

The average is: 25.9286

Explanation:

In the above code, the float method "Avg" is declared, that accepts two parameters, that is "sum and n", inside the method, a float variable average is declared that divides and returns its values.

In the main method a float array "ar" is declared that holds values, in the next line, float variable "sum" and integer variable "n, j" is used.

In for loop, the "i" variable is used to add array values in the sum variable and pass into cout to call the "Avg" method and print its return value.

3 0
2 years ago
Other questions:
  • Over time, attackers have had to increase their skills to be able to attack systems or create viruses. True False
    8·1 answer
  • Match the spreadsheet features with their respective descriptions.
    9·2 answers
  • The function below takes a single parameters: a list of numbers called num_list. Return a new list containing just the three lar
    5·1 answer
  • Please help!! Even if you help a little I will be very thankful!
    7·1 answer
  • What does that program print out?<br><br> a) 2<br> b) 3<br> c) 4<br> d) 8
    14·2 answers
  • Create a program named Reverse3 whose Main() method declares three integers named firstInt, middleInt, and lastInt. Assign the f
    9·1 answer
  • What games do you play?<br><br><br> Be sure not to report any answers!
    5·1 answer
  • PLEASE HELP AND FAST!!!!!<br>Which of the following devices uses binary code?
    6·2 answers
  • JUST MAXED OUT THE COMMENTS anyways come here
    7·2 answers
  • How do you change your name in the profile section because i am trying to change my name.
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!