Skip to main content

Inline Function // Advantage or Disadvantage in Hindi or English

 "TIME SMART STUDY" में आप सभी का स्वागत है


आज हम बात करेंगे C++ Program के inline function की―


Inline Function—

Inline function में function call replace हो जाता है function code से।

    C++ provides an inline functions to reduce the function call overhead. Inline function is a function that is expanded in line when it is call. When the inline function is called whole code of the inline functions gets inserted or substituted at the point of inline function call.


Advantage—

Execution fast हो जाता है।


Disadvantage―

Program की length increase (ज्यादा) हो जाती है।

Inline function limitation—

  • अगर किसी function में हम looping का use करते हैं तो उसे हम Inline function नही बना सकते ।
  • इसमे static variable का use हम नहीं कर सकते।
  • Function का recursion नहीं होना चाहिए।
  • Switch or goto हम inline function में हम use नही कर सकते।

HOW DOES RECURSIVE FUNCTION WORKS—



INLINE FUNCTION DISADVANTAGES:-


   अगर हम दो variable बना रहें हैं तो हम compile करते है तो function code को attach करना पड़ता हैं।

  • When inline function body is substituted at the point of function call, total number of variables used by the function also get inserted. So the no of register going to be used for the variable will also get increased.
  • If you use too many inline function then the size of binary executable file will be large, because of the dublication of same code.

अगर आपको ये पोस्ट अच्छी लगी हो तो हमे कमेंट कर के जरूर बताएं।

Comments

Popular posts from this blog

Dalton's Atomic Theory—(Chemistry)

Dalton's Atomic Theory The theory that' all matter is made up of very tiny indivisible particles (atoms)' is called atomic theory of matter. Dalton's put forward his Atomic Theory of matter in 1808. The various postulates of Dalton's atoAto Theory of matter are as follows: All the matter is made up of very small particles called 'atoms'. Atoms cannot be divided. Atoms can neither be created nor destroyed Atoms are of various kinds. There are as many kinds of atoms as are elements. All the atoms of a given element are identical in every respect, having the same mass, size and chemical properties. Atoms of different elements differ in mass, size and chemical properties. Chemical combination between two elements consists in the joining together of atoms of these elements to form molecules of compounds. Drawbacks of Dalton's Atomic Theory It is now known that some of the statements of Dalton's Atomic Theory of matter are not exactly corre...

The sentence//Kinds of sentence (English grammar)

The Sentence— A group of words that makes complete sense is called a Sentence. Example– (1) Birds fly in the air. (2) She writes very well. Phrase A group of words that makes sense but not complete sense. Example– (1) in a great hurry. (2) in the early morning. Kinds of sentence— Declarative Sentence Interrogative Sentence Imperative Sentence Exclamatory Sentence Declarative Sentence— A sentence that states or declares something is called a Declarative sentence. Example- (1) The sun rises in the east. (2) The boys made a noise. Interrogative Sentence– A sentence that asks a question is called Interrogative sentence. Example- (1) Why were you late yesterday ? (2) Have you done your lesson ? Imperative Sentence— A sentence that expresses a command, a request, or a desire is called an Imperative sentence. Example– (1) Amar, shut the door. (2) Please do this just now. Exclamatory Sentence— A sentence that expresses some strong or sudden feeling is call...

Basic notes—Indian Penal Code (IPC)—Chapter-1(Law Students)

Chapter-1 (Introduction)— Preamble- General penal code for India (Sec-1) Title and Extent- Extend to whole India except Jammu& Kashmir. (Sec-2) Punishment of offence Committed within India— Who Committed crime under the code shall be guilty within India. (Sec-3) Punishment of offence Committed beyond but which by law may be tried within India. (Sec-4) Extension of code to Entro-territorial offence. Any ship or aircraft registered in India. Committed offence targeting a computer resource located in India. Explanation— Computer Resource shall have the meaning assigned to it in clause of sub sec(1) of sec-2 of Information technology Act 2000. (Sec-5) Certain laws not to be affected by this Act-For mutiny, & dessertion of offences, Soldiers, Sailor or Airman in the service of Government of India any special or local law.