Forum

Static function

This thread contains 1 reply, has 2 voices, and was last updated by Nitesh User Do not delete 5 years, 8 months ago.

  • Author Replies
    • #54077

      What is a static function and its usage?


    • #54079

      Static functions in C. In contrast to worldwide functions in C, access to static functions is restricted to the record where they are proclaimed. Hence, when we need to restrict access to functions, we make them static.

      Another explanation behind making functions static can be reuse of a similar functions name in different records.

      A function, which has a function definition prefixed with a static keyword is defined as a static function. The static capacity should call inside the same source code.

      In the event that you got this relationship right, you will almost certainly comprehend concept now.

      Here the writing board compares to static, the students relate to examples/objects and their note pads compare to the nearby memory.

      Presently attempt to relate this,

      1) The static variable is introduced when a class is stacked which identifies with the chalkboard was fixed when the classroom was built.

      2) The students here speak to occurrences of that specific classroom. Here students entering the classroom identifies with the new object being made in memory.

      3) Their notebook identifies with the nearby memory of objects/instances. They can peruse and compose anything on it, which will or won’t be noticeable to some other student(depending on access level).


      Regards,
      Nitesh Bavishiya

Viewing 1 reply thread

You must be to reply to this thread.Please or . Registration is 100% free.

GET FREE CONSULTATION

Call Us Now For Free Consultation97370 05566

Our experts listen to you patiently and suggest you the right course after conducting a personality profile test. Register your interest below to schedule personality profile test for you.

SUBSCRIBE TO OUR NEWSLETTER

Subscribe to get latest updates regarding courses, IT industry and career prospects.

Copyright 2016-2024 Smart Mentors. All Rights Reserved.

Login

FORGOT PASSWORD

Sign up now to Become An Instructor

    Register your Interest

      cf7captchaRegenerate Captcha