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
Pepsi [2]
4 years ago
15

Consider the following code snippet:

Computers and Technology
1 answer:
satela [25.4K]4 years ago
3 0

Answer:

1. Buffer could be overflowed when input entered by user in command line is greater than size 12 it may of size 13 or larger.

for example: when user enters the string 'dolatsinghsodha' than the size of that string stored in bar variable will be 15 as it not size bounded but when it stored in MyArray[12] than it will overflow the buffer for array because MyArray[] is input bounded to maximum 12 characters.

2. There are two ways to prevent buffer overflow

    i) make bar varaible input bounded to 12 characters or

    ii) assign MyArray[] size at dynamic time

  or change code to following state:

        void simple (char *bar) {

           int a=bar.length

          char MyArray[a];

        strcpy(MyArray, bar); // copies bar in MyArray --> Myarray==bar }

        }

         but it in not possible in some  languages and platforms

  or we can ask user

You might be interested in
PYTHON!
Lyrx [107]

Answer:

hi Po konbanwa sayo I'm pilipino I'm live in philippines

5 0
2 years ago
STOP DELETING MY ANSWERS AND QUESTIONS!!!!!!!
puteri [66]

Answer:

no

Explanation:

trolled

3 0
3 years ago
__________ is a protocol used by e-mail clients to download e-mails to your computer.
arlik [135]
POP is a protocol used by e-mail clients to download e-mails to your computer. The correct option among all the options that are given in the question is the last option or option "d". The full form of POP is Post Office Protocol. After the email has been downloaded, the email gets erased from the server automatically.
7 0
4 years ago
!!General Chromebook Software Question!!
castortr0y [4]

Answer:

Explanation:

Google???

7 0
3 years ago
Read 2 more answers
List any three importance of computer​
Naddika [18.5K]

Answer:

here is the answer

Explanation:

1) accurate

2) fast

3) can accomplish tasks more effencily

5 0
3 years ago
Other questions:
  • A _____ is an area hosted by a Web server in which project members and colleagues can share documents, models, photos, and other
    6·1 answer
  • What is this effect in photoshop or photography?
    12·2 answers
  • Discuss the 21 st century competencies or skills required in the information society and 4 ways you can apply it during supporte
    6·1 answer
  • Create a do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop shou
    5·1 answer
  • Can someone please help me on these short short questions marking Brainly computer modeling people please help
    14·1 answer
  • Because floating points have decimals, they're more precise and take up more memory than integers.
    6·1 answer
  • A website for a certain political party or candidate is likely to have unbiased
    6·1 answer
  • Which unknown factor affects prices in the financial markets?
    9·1 answer
  • You have a passage of text that needs to be typed out, but some of the letter keys on your keyboard are broken! You're given an
    14·1 answer
  • Bits of information are combined into meaningful units so that more information can be held in short-term memory through the pro
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!