The Gateway to Computer Science Excellence
+5 votes
2k views

Which of the following programming language(s) provides garbage collection automatically

  1. Lisp
  2. C++
  3. Fortan
  4. C
in Programming by Veteran (105k points) | 2k views

3 Answers

+8 votes
Best answer

Except Lisp all language C, C++, Fortran have manual memory management.So Lisp provide automatic garbage collection.

Reference :Garbage Collection

by Boss (38.4k points)
selected by
0
any reference plz,,
+10 votes

Answer is A) LISP

Because C,C++ and FORTRAN does not provide that. 

by Boss (35.6k points)
+6
Loved the explanation.
+3 votes

Answer :  Lisp

Lisp is especially notable as both the first functional programming language and the first language to introduce garbage collection.

by Boss (45.3k points)
edited by
0

The reason behind my answer is I looked for lisp on google because i don't know anything about it ,but C++ is a object oriented programming Language like Java and C# and Java  and C# has garbage collector so i thought C++ must be having garbage collector.

in case of C Lang we have to write a code for garbage collector .

0
Ok but anyway C++ does not provide garbage collection automatically .
+1
I have corrected my answer...
0
what is garbage collector..?????  :'(
+1

In computer science, garbage collection (GC) is a form of automatic memory management. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. 

Refrence :https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,644 questions
56,503 answers
195,553 comments
101,036 users