Give 2 examples of a code optimization?

Answer Posted / mms zubeir

I would like to quote two things from the same area.

1. Read/Write chunks from/into a file instead of byte by
byte reading.

2. Aquire resources late and relieve it early. Example, if
you want to use a file, open the file as late as possible
and release it as early as possible after use.

Is This Answer Correct ?    12 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long does it take to get good at leetcode?

654


What is virtual destructor ans explain its use?

599


Define a conversion constructor?

608


How do you master coding?

558


What is DlgProc?

596






What is set in c++?

655


Is oops and c++ same?

576


State two differences between C and C++.

604


What is atoi in c++?

562


What is null pointer and void pointer?

620


Explain class invariant.

584


What is c++ stringstream?

601


Can a Structure contain a Pointer to itself?

608


What is an orthogonal base class in c++?

650


What is pair in c++?

623