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
Roger wants to give semantic meaning to the contact information, which is at the bottom of the web page. To do this he will use
Elden [556K]

Answer:

Parent

Explanation:

HTML is an acronym for hypertext markup language and it is a standard programming language which is used for designing, developing and creating web pages.

Generally, all HTML documents are divided into two (2) main parts; body and head. The head contains information such as version of HTML, title of a page, metadata, link to custom favicons and CSS etc. The body of a HTML document contains the contents or informations that a web page displays.

In this scenario, Roger wants to give semantic meaning (an element conveying informations about the type of content contained within an opening and closing tag) to a contact information placed at the bottom of a webpage. Thus, in order to do this, he should use a footer element as a parent of the contact information and as such all instance variables that have been used or declared in the footer class (superclass) would be present in its contact information (subclass object).

4 0
3 years ago
In python please!! Write the definition of a function named countPos that needs integer values from standard input until there a
jek_recluse [69]

Answer:

Explanation:

The following code is written in Python it doesn't use any loops, instead it uses a recursive function in order to continue asking the user for the inputs and count the number of positive values. If anything other than a number is passed it automatically ends the program.

def countPos(number=input("Enter number: "), counter=0):

   try:

       number = int(number)

       if number > 0:

           counter += 1

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

       else:

           newNumber = input("Enter number: ")

           return countPos(newNumber, counter)

   except:

       print(counter)

       print("Program Finished")

countPos()

8 0
3 years ago
IN PYTHON LANGUAGE
shtirl [24]

favorite_color = input("Enter favorite color:\n")

pet = input("Enter pet's name:\n")

num = input("Enter a number:\n")

print("You entered: "+favorite_color+" "+pet+" "+num)

password1 = favorite_color+"_"+pet

password2 = num+favorite_color+num

print("First password: "+password1)

print("Second password: "+password2)

print("Number of characters in "+password1+": "+str(len(password1)))

print("Number of characters in "+password2+": "+str(len(password2)))

This works for me.

8 0
2 years ago
Read 2 more answers
What are 2 of system software and how are they used?
xeze [42]

Answer:

System software is software on a computer that is designed to control and work with computer hardware. The two main types of system software are the operating system(Windows,Linux,Mac OS)  and the software installed with the operating system, often called utility software (Anti virus, Disk formatting, Computer language translators) . In some cases, the operating system and utility software depend on each other to function properly.

Some system software is used directly by users and other system software works in the background. System software can allow users to interact directly with hardware functionality, like the Device Manager and many of the utilities found in the Control Panel.

5 0
3 years ago
FREE POINT IF YOU ADD ME AS A FRIEND <br> XOXOANAI04
scoray [572]

Answer:

hfufbrdubedyg gxnsbetxyfbrdybeuxuabrbxybsbcyebdydbehdhdhdhcubdenudnejwjw7xtrwhajaobcbdggevejaveyxbwbgzfybaegnesujwbghene8hav ejuzvwbfhuh bsndndbchchychdbruxnejxne7hdrhxhehnxurnxhhbehdndjndhd

8 0
2 years ago
Read 2 more answers
Other questions:
  • A very simple device that connects network components and sends packets of data to all other connected devices is called a _____
    5·1 answer
  • 11. Print Layout, Full Screen Reading, Web Layout, Outline and Draft are examples of _______. 12. What do you do if the spelling
    5·1 answer
  • In this problem, we explore some of the properties of the CRC. For the generator G (=1001) given in Section 5.2.3, answer the fo
    6·1 answer
  • How do I use this without the spring?
    6·1 answer
  • A user calls you and says that when they try to connect to the internal website, they are prompted for authentication. The user
    14·1 answer
  • The fraction 460/7 is closest to which of the following whole numbers?
    11·1 answer
  • If we can lock a file, we can solve the race condition problem by locking a file during the check-and-use window, because no oth
    14·1 answer
  • Use the variables k, d, and s so that they can read three different values from standard input--an integer, a double, and a stri
    15·1 answer
  • I have a very quick question. So im applying for Early college and i need some future educational goals and maybe im just thinki
    6·1 answer
  • The __________ operator increases the value of the variable by 1 after the original value is used in the expression in which the
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!