Sign up now
to enroll in courses, follow best educators, interact with the community and track your progress.
Download
Objects Oriented Programming Part 4: Computer Science and Applications (in Hindi)
499 plays

More
This lesson describes the object oriented programming concepts.

Sandeep
Co-founder of BSI Academy and running YouTube channel. 5 years of teaching experience. Qualified in UGC NET & CSIR in Computer Science as JR

U
Unacademy user
sir ,mole se bhar gra me ,ml me, no of atom,moleculer ke bare me btao
Anirudh Walia
a year ago
Check out my new course on Mole Concept. Please visit on my profile. You will find the course titled as Basic concept of chemistry unit 1
  1. UGC NET Paper -2


  2. About Me . Sandeep . M.Tech (IT) from IIIT CSIR (Engineering Science) as JRF CBSE UGC NET (JRF) - Computer Science & Applications Worked as Software Engineer & Research Scientist


  3. Data Structure, Computer Network, DBMS & OS for CS Paper 2 Sandeep Singh 10k followers 001/13:3g nacademy YouTube In this course, Sandeep Singh will comprehensively cover Computer Science & Applications for UGC NET Paper 2. The course is designed in a manner so that it will be helpful in solving objective-based questions as well as in analytical understanding of the topics of Paper 2. The course will be conducted in Hindi and notes will be provided in English 1st September to 18th September 2018 18 hours of live classes Private Discussion Forum Doubt clearing sessions and Live quizzes T3,200 Includes 18% GST Apply for this Plus Course About this course O Last date to apply is 31st Aug LIMITED SEATS, Cost increases on 23rd Aug. Live Sessions The course consists of 12 sessions of 1 hour 30 mins duration each. Session recording will be provided for all the sessions Discussion Forums Access to a private forum moderated by Sandeep Singh where you can discuss and debate with your peers, access learning material and more. Personalized Learning All learners will have access to weekly doubt clearing sessions, live quizzes, learning materials and discussion with peers


  4. Obiect Oriented Concepts


  5. Part -04


  6. Dynamic Memory Allocation - new & delete operators The new and delete operators are used to allocate and free memory at run time. The new operator allocates memory and returns a pointer to the start of it. The delete operator frees memory previously allocated using new. The general forms of new and delete are shown here: . . P-var new type; delete p_var;


  7. Here, pvar is a pointer variable that receives a pointer to memory that is large enough to hold an item of type type. . Even though malloc/free allocates and releases the memory respectively . Constructor/Destructor is not called during dynamic object creation/destruction. Hence use new/delete for dynamic memory allocation for objects and malloc/free for primitive data types.


  8. Memory allocation through new and delete The dynamic memory allocation happens on the heap. Heap is a memory space which grows or shrinks dynamically Whenever the memory is allocated dynamically for any object, a space is allocated in the heap. This allocation remains until it is deleted (freed). . If a program fails to de-allocate memory, that memory cannot be used by other programs. This is called as "memory leak".


  9. Inline Functions Normal function-calls eat up lot of CPU time for its bookkeeping activities . So, for smaller methods, the Crt compiler automaticelly replaces the function calls with the actual code to be executed. As a programmer, we can also request the compiler to do so. This is done usually for smaller and non-recursive functions. . Inline is a suggestion given to the compiler. Compiler decides whether to replace or not.


  10. Static Data Members Data member whose value is shared by all the objects of the class Static data is allocated memory only once when the class is loaded. Must be defined outside the class Also can be initialized during definition, If not initial value will be 0. . .


  11. Thank You