Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS201 Introduction to Programming GDB Fall 2020 Solution / Discussion Last Date: 16-02-2021

CS201 - Introduction to Programming
Course Announcement Back
GDB for CS-201
Dated:Feb 10, 21

Dear students,

GDB topic has been uploaded on VLUMS. GDB interface will open for two days from 15-Feb to 16-Feb-2021. You can post you answer within given dates. Dates are according to Pakistan Standard Time.

 

GDB Statement: Modern programming languages like C/C++ support static as well as dynamic memory allocation for variable, object, structures etc. In static allocation, memory is allocated to the program during compile-time. However in the case of Dynamic allocation, memory is allocated during runtime. Both these techniques have their pros and cons and can be used in different scenarios.

Now suppose you are working in an XYZ organization as a C++ developer. Currently, the HR department of the organization is recruiting people for a vacant position in the organization. Software Team of the Organization assigns you the task of developing an application to keep track of the number and records of applicants who have applied for the post. Now keeping in mind that organization has limited number of computational resources available to them, being a C++ developer which type of memory allocation technique (Static or Dynamic) you will be using in this case? Justify your answer with valid reason in either case.

GDB Instructions:

  1. You need to provide precise and to the point answer, avoid irrelevant details.
  2. Material that is copied from the internet or another student will get zero marks.
  3. You cannot participate in the discussion after the due date via email.
  4. The GDB will open and close on specified date and time. Please note that NO grace day or extra time will be given for posting comments on GDB.

Views: 759

Replies to This Discussion

Share the GDB Question & Discuss Here....         

Stay touched with this discussion, Solution idea will be uploaded as soon as possible in replies here before the due date.

CS201 GDB Fall 2020 Solution idea:

Dynamic memory Allocation is best for a given scenario because

 

Main Reason:

  1. We never want to lose our limited resources.
  2. Data can increase or delete without using extra memory location.
  3. In this Scenario our memory is not Loss.
  4. And you can write more.
  5. In this Memory we add more Data.
  6. In Dynamic Memory Allocation we delete the Data so as that memory is free for space.
  7. The best main reason for Dynamic Memory allocation it allocates the memory at Run time.

CS201 GDB 1 Solution Fall 2020 - 2021 || Introduction to Programming||

1. We never want to lose our limited resources.
2. Data can increase or delete without using extra memory location.
3) In this Scenario our memory is not Loss.
4) And you can write more.
2) In this Memory we add more Data.
3) In Dynamic Memory Allocation we delete the Data so as that memory is free for space.
4) The best main reason for Dynamic Memory allocation it allocates the memory at Run time.

Cs 201 || GDB Solution || 2021

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service