![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 06.07.2021 15:20 lb31224
There is a memory management issue in the following main function. Please explain the memory management issues in this code and explain the reason behind this.
int main()
{
char *p1 = malloc(20);
char *p2 = malloc(30);
strcpy(p1, "cat");
p2 = p1;
printf("%s", p1);
free(p1);
free(p2);
return 0;
}
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 14:30
When workers demonstrate patience, are able to manage there emotions, and get along with other employees, which skills are being displayed?
Answers: 1
You know the right answer?
There is a memory management issue in the following main function. Please explain the memory managem...
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
English, 21.02.2020 04:33
![question](/tpl/images/cats/mat.png)
Mathematics, 21.02.2020 04:33
![question](/tpl/images/cats/en.png)
English, 21.02.2020 04:33
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 21.02.2020 04:33
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 21.02.2020 04:33
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/istoriya.png)
History, 21.02.2020 04:33
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)