Is it possible to call atexit() function more than once in a C program?

C Programming Language >   Function in C Language >   Predefined Functions  

Long Question

598


Answer:

Yes. We can call atexit() function more than once. But, they will be executed in reverse order as a stack.


#include <stdio.h> </p>
                                          
                                        <hr>
                                        
                              <div style="text-align:center">
                              <a href="#list" class="btn btn-info btn-sm main-gradient-tutorials">Go to Question List</a>
                              </div>
                              
                              <div class = "shadow p-3 mt-2" style = "border-radius: 10px;">
                               <div class='col m-3'><p> <i class='fa fa-info-circle'></i> <small>This Particular section is dedicated to <b>Question & Answer</b> only. If you want learn more about <b>C Programming Language</b>. Then you can visit below links to get more depth on this subject.  </small></p></div><div class='col m-3'><div class="row">
     <div class="col bg-light m-2 shadow btn btn-success"> <a href="https://www.atnyla.com/syllabus/c-programming-language/1"> C Syllabus </a> </div>
     <div class="col bg-light m-2 shadow btn btn-success">   <a href="https://www.atnyla.com/tutorial/about-c-tutorial/1/152">C Tutorial </a> </div>  
     <div class="col bg-light m-2 shadow btn btn-success"> <a href="https://www.atnyla.com/fundamentals-of-c-language/1/20">C Chapterwise Programs </a>  </div> 
     <div class="col bg-light m-2 shadow btn btn-success"> <a href="https://www.atnyla.com/general-knowledge/88/158">C Chapterwise MCQs </a> </div>
     <div class="col bg-light m-2 shadow btn btn-success"> <a href="https://www.atnyla.com/qa/fundamentals-of-c-language/1/20">C Chapterwise Q & A </a> </div>

    <div class="col bg-light m-2 shadow btn btn-success"> <a href="https://www.youtube.com/watch?v=I_DwOci2mtE&list=PL2Bn5-JgUDvfFxrUDJg0E9FqoxLjth5fo" rel="nofollow">C Free Videos </a> </div>
</div>
<hr></div><hr style='height:3px;border-width:0;color:gray;background-color:gray'>                              </div>
                                 
                              <br>
                             <div class="shadow p-3 mb-5 bg-body rounded">
                               <a href="/tutorial/about-c-tutorial/1/152" class="btn btn-sm btn-default"># C Tutorials</a> 
                               <a href="/tutorial/java/0/0" class="btn btn-sm btn-default"># JAVA Tutorials</a>
                               <a href="/tutorial/about-html5-tutorial/2/233" class="btn btn-sm btn-default"># HTML Tutorials</a>
                           
                              <a href="https://www.atnyla.com/tutorial/about-tutorial/6/395" class="btn btn-sm btn-default"># Computer Fundamental</a> 
                               <a href="https://www.atnyla.com/tutorial/about-dsa/3/295" class="btn btn-sm btn-default"># Data Structure</a>
                               <a href="https://www.atnyla.com/tutorial/about-dbms-tutorial/13/713" class="btn btn-sm btn-default"># DBMS Tutorials</a>
                           
                              <a href="https://www.atnyla.com/tutorial/about-sql-tutorial/5/355" class="btn btn-sm btn-default">SQL</a> 
                               <a href="https://www.atnyla.com/tutorial/about-c-tutorial/8/468" class="btn btn-sm btn-default"># C# Language</a>
                               <a href="https://www.atnyla.com/tutorial/about-r-tutorial/7/409" class="btn btn-sm btn-default"># R Language</a>
                            
                              <a href="https://www.atnyla.com/tutorial/about-php-tutorial/12/604" class="btn btn-sm btn-default"># PHP</a> 
                               <a href="https://www.atnyla.com/tutorial/about-python-tutorial/11/597" class="btn btn-sm btn-default"># Python</a>
                               <a href="https://www.atnyla.com/tutorial/about-vue-js-tutorial/14/765" class="btn btn-sm btn-default"># Vue JS</a>
                             </div>
                             
                             <hr>
                             <h3>Join Our telegram group to ask Questions </h3>
                             <p> Click below button to join our groups. </p>
                             <div class="row">
                                 <div class="col m-2 bg-light shadow btn btn-success">
                                   <a href="https://t.me/atnyla"  rel="nofollow" target="_blank"> Ask Question - CSE </a>
                                 </div>  
                                  <div class="col m-2 bg-light shadow btn btn-success">
                                    <a href="https://t.me/ComputerLanguageWithRumman"  rel="nofollow" target="_blank"> Programming Language - PDF</a>
                                </div> 
                            </div>
                                        
                              <br>
                               
                            </div> 
                        </div>
                    </div>
                   <div class="col-lg-5">
                
                            <ul class="list-group" >
                                <li id="list" class="list-group-item d-flex justify-content-between align-items-center main-gradient-tutorials mb-2"><strong>Related Program List</strong></li>
                                         <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-exit-function-in-c-question/30/659">
                  <h5 class="mb-1" style="color:#194757;">659. &nbsp;What is exit() function in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <ul>
<li>exit() function terminates the program/process normally and returns the status code to the parent program/process.</li>
<li>Syntax: void exit(int status)</li>
</ul>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/predefined-functions/1/391">
                    <small># Tutorial: Predefined Functions</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/30">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: Function in C Language</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-the-difference-between-exit-and-return-in-c-question/30/660">
                  <h5 class="mb-1" style="color:#194757;">660. &nbsp;What is the difference between exit() and return() in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <ul>
<li>exit() is a system call which terminates current process. exit() is not an instruction of C language.</li>
<li>Whereas, return() is a C language instruction/statement and it returns from the current function (i.e. provides exit status to calling function and provides control back to the calling function).</li>
</ul>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/predefined-functions/1/391">
                    <small># Tutorial: Predefined Functions</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/30">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: Function in C Language</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-the-use-of-define-in-c-question/36/661">
                  <h5 class="mb-1" style="color:#194757;">661. &nbsp;What is the use of  #define in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <p>#define is a pre-processor directive which is used to define constant value. This constant can be any of the basic data types.</p>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/introduction-about-pre-processor/1/376">
                    <small># Tutorial: Introduction about Pre-processor</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/36">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: C Pre-processor</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-the-syntax-for-comments-in-c-question/21/662">
                  <h5 class="mb-1" style="color:#194757;">662. &nbsp;What is the syntax for comments in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <p>Below is the syntax for comments in C. The characters or words or anything which are given between &ldquo;/*&rdquo; and &ldquo;*/&rdquo;, won&rsquo;t be considered by C compiler for compilation process. These will be ignored by C compiler during compilation.</p>
 
<p>Syntax: /* your comments here */</p>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/first-program-in-c-hello-world/1/159">
                    <small># Tutorial: First Program in C Hello World</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/overview-of-c-language/1/21">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: Overview of C Language</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-operator-in-c-question/36/663">
                  <h5 class="mb-1" style="color:#194757;">663. &nbsp;What is ##  operator in C?</h5>
              </a>
            </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/introduction-about-pre-processor/1/376">
                    <small># Tutorial: Introduction about Pre-processor</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/36">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: C Pre-processor</small>
            </a>
                                  <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Long </small></span>
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-pragma-in-c-or-how-will-you-execute-functions-before-and-after-main-function-in-c-program-question/36/664">
                  <h5 class="mb-1" style="color:#194757;">664. &nbsp;What is pragma in C? Or how will you execute functions before and after main function in C program?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <p>#pragma is a pre-processor macro in C. It is used to call a function before and after main function in a C program.</p>
<pre class="prettyprint">
<xmp>
#include <stdio.h>

void function1( );
void function2( );

#pragma startup function1
#pragma exit function2

int main( )
{
                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/introduction-about-pre-processor/1/376">
                    <small># Tutorial: Introduction about Pre-processor</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/36">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: C Pre-processor</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/how-will-you-override-an-existing-macro-in-c-question/36/665">
                  <h5 class="mb-1" style="color:#194757;">665. &nbsp;How will you override an existing macro in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <p>To override an existing macro, we need to undefine existing macro using &ldquo;#undef&rdquo;. Then, we need to define same macro again with new value.</p>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/introduction-about-pre-processor/1/376">
                    <small># Tutorial: Introduction about Pre-processor</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/36">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: C Pre-processor</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/how-to-check-whether-macro-is-defined-or-not-in-a-c-program-question/36/666">
                  <h5 class="mb-1" style="color:#194757;">666. &nbsp;How to check whether macro is defined or not in a C program?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <p>#ifdef pre-processor directive checks whether particular macro is defined or not in a C program.</p>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/introduction-about-pre-processor/1/376">
                    <small># Tutorial: Introduction about Pre-processor</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/36">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: C Pre-processor</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-the-difference-between-memcpy-and-strcpy-functions-in-c-question/52/667">
                  <h5 class="mb-1" style="color:#194757;">667. &nbsp;What is the difference between memcpy() and strcpy() functions in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <ul>
<li>memcpy() function is used to copy a specified number of bytes from one memory to another. Whereas, strcpy() function is used to copy the contents of one string into another string.</li>
<li>memcpy() function acts on memory rather than value. Whereas, strcpy() function acts on value rather than memory.</li>
</ul>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/all-string-functions/1/261">
                    <small># Tutorial: All String Functions</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/52">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: String  functions in C </small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
            <div class="list-group divStyleQuestion" style="border:1px solid #e0e0e0;padding:8px">
            <div class="d-flex w-100 justify-content-between">
              <a href="/qanswer/what-is-the-difference-between-memcpy-and-memmove-functions-in-c-question/29/668">
                  <h5 class="mb-1" style="color:#194757;">668. &nbsp;What is the difference between memcpy() and memmove() functions in C?</h5>
              </a>
            </div>
                            <div class="card">
                  <div class="card-body">
                     Answer: <ul>
<li>memcpy()&nbsp; function is is used to copy a specified number of bytes from one memory to another.</li>
<li>memmove() function is used to copy a specified number of bytes from one memory to another or to overlap on same memory.</li>
<li>Difference between memmove() and memcpy() is, overlap can happen on memmove(). Whereas, memory overlap won&rsquo;t happen in memcpy() and it should be done in non-destructive way.</li>
</ul>                  </div>
                </div>
                        <div class="d-flex w-100 justify-content-between">
                <a style="color:#9e9d9d;" href="/tutorial/introduction-to-string/1/216">
                    <small># Tutorial: Introduction to String</small> 
                </a>
            </div>
           
                        <a style="color:#9e9d9d;" href="/qa/-/1/29">
                <small><i class="fa fa-code" aria-hidden="true"></i> Question: String in C Language</small>
            </a>
                                   <span class="float-end" style="color:#9e9d9d"> <small><i class="fa fa-check" aria-hidden="true"></i> Short </small></span>  
                            </div>
      
                                    <li class="list-group-item d-flex justify-content-between align-items-center main-gradient-tutorials mb-2"><a href="http://www.atnyla.com/overview-of-java-language/0/2"><i class="fa fa-code" aria-hidden="true"></i> Chapterwise Java Program</a></li>
                                <li class="list-group-item d-flex justify-content-between align-items-center main-gradient-tutorials mb-2"><a href="http://www.atnyla.com/fundamentals-of-c-language/1/20"><i class="fa fa-code" aria-hidden="true"></i> Chapterwise C Program</a></li>
                                <li class="list-group-item d-flex justify-content-between align-items-center main-gradient-tutorials mb-2"><a href="http://www.atnyla.com/array/3/54"><i class="fa fa-code" aria-hidden="true"></i> Chapterwise Data Structure Program</a></li>
                            </ul>
                      <br>
                      
                  
                   </div>
 </div>
 
</div>
 </div> 
 </div>
 </div>
 </div>
<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<style>
         
 #myBtn {
  display: none; /* Hidden by default */
  position: fixed; /* Fixed/sticky position */
  bottom: 20px; /* Place the button at the bottom of the page */
  right: 30px; /* Place the button 30px from the right */
  z-index: 99; /* Make sure it does not overlap */
  border: none; /* Remove borders */
  outline: none; /* Remove outline */
  background-color: blue; /* Set a background color */
  background-color: transparent;
  box-shadow: 0 6px 6px rgba(0, 0, 0, 0.6);
  color: white; /* Text color */
  cursor: pointer; /* Add a mouse pointer on hover */
  padding: 15px; /* Some padding */
  border-radius: 10px; /* Rounded corners */
  font-size: 18px; /* Increase font size */
  border-radius: 50%;
}

#myBtn:hover {
  background-color: #00a7f5; /* Add a dark-grey background on hover */
}
</style>
     
<script>
// Get the button:
let mybutton = document.getElementById("myBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
  if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
    mybutton.style.display = "block";
  } else {
    mybutton.style.display = "none";
  }
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
  document.body.scrollTop = 0; // For Safari
  document.documentElement.scrollTop = 0; // For Chrome, Firefox, IE and Opera
}
</script> 

<footer id="footer" style = "background: linear-gradient(to right, #1a2980, #26d0ce); margin-top: 10px;" class = "text-white p-3"> 
    <div class="footer-top">
      <div class="container-fluid">
        <div class="row"> 
          <div class="col-lg-2 col-md-6 footer-contact text-white"> 
          </div> 
          <div class="col-lg-3 col-md-6 footer-links text-white">
            <p style="font-size: 16px; color: white;">Useful Links</p>
            <ul>
              <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/" class = "text-white">Home</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/about/" class = "text-white">About us</a></li> 
              <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/terms-and-conditions/" class = "text-white">Terms of service</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/about/guest-post" class = "text-white">Guest Post</a></li> 
              <li><i class="bx bx-chevron-right"></i> <a href="hhttps://www.atnyla.com/about/ads/" class = "text-white">Advertisement</a></li>
            </ul>
          </div> 
          <div class="col-lg-3 col-md-6 footer-links text-white">
            <p style="font-size: 16px; color: white;">Login</p>
            <ul>
              <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/user/" class = "text-white">login</a></li>
              <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/user/" class = "text-white">Sign Up</a></li> 
            </ul>
          </div> 
          <div class="col-lg-3 col-md-6 footer-newsletter">
            <p style="font-size: 16px; color: white;">Visit All Home</p>
            <ul>
            <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/syllabus/java-programming-language/0" class = "text-white">Syllabus</a></li>
            <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/library/java-programming-language" class = "text-white">Subject</a></li>
            <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/library/" class = "text-white">Library</a></li>
            <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/gk-and-current-affairs" class = "text-white">GK/MCQ</a></li>
            <li><i class="bx bx-chevron-right"></i> <a href="https://www.atnyla.com/blog/" class = "text-white">Blog</a></li>
            <!--<p>Tamen quem nulla quae legam multos aute sint culpa legam noster magna</p>-->
            <!--<form action="" method="post">-->
            <!--  <input type="email" name="email"><input type="submit" value="Subscribe">-->
            <!--</form>-->
           </ul>
          </div> 
           <!--<div class="col-lg-2 col-md-6 footer-newsletter">-->
                <!-- <p style="font-size: 16px; color: white; ">Social Links</p>-->
                <!-- <ul> -->
                <!-- <li> <a href = "https://chat.whatsapp.com/BfdvA6k89H28bD4q4QqiaK" class="text-white">  Join Whatsapp Group  <i class="fa-brands fa-whatsapp"> </i> </a></li>-->
                <!--<li> <a href = "https://t.me/ComputerLanguageWithRumman" class="text-white">  Join Telegram Group  <i class="fa-brands fa-telegram"></i> </i> </a></li>-->
                <!--</ul>-->
            <!--</div>-->
        </div>
      </div>
    </div> 
    <div class="container d-md-flex   text-white"> 
      <div class="social-links text-center text-md-end pt-3 pt-md-0 text-white">
        <!--<a href="#" class="twitter"><i class="bx bxl-twitter"></i></a>-->
        <!--<a href="#" class="facebook"><i class="bx bxl-facebook"></i></a>-->
        <!--<a href="#" class="instagram"><i class="bx bxl-instagram"></i></a>-->
        <!--<a href="#" class="google-plus"><i class="bx bxl-skype"></i></a>-->
        <!--<a href="#" class="linkedin"><i class="bx bxl-linkedin"></i></a>-->
      </div>
    </div>
    
    <div class="me-md-auto text-center text-md-start">
        <div class="copyright text-center">
          © Copyright <strong><span>atnyla</span></strong>. All Rights Reserved
        </div>
        <div class="credits text-center"> 
          Designed by <a href="https://atnyla.com/"  style="color: white">atnyla.com</a>
        </div>
      </div> 
  </footer> 
    
<!-- Scripts -->
<!-- Bootstrap core JavaScript -->
<script src="https://atnyla.com/vendor/jquery/jquery.min.js"></script>

<script src="https://atnyla.com/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>  

<script src="https://atnyla.com/assets/js/isotope.min.js"></script>  

<!--<script src=" https://unpkg.com/isotope-layout@3.0.6/dist/isotope.pkgd.min.js"></script>  -->

<script src="https://atnyla.com/assets/js/owl-carousel.js"></script>
<!--<script src="https://atnyla.com/assets/js/lightbox.js"></script>-->
<script src="https://atnyla.com/assets/js/tabs.js"></script>

<!--<script src="https://atnyla.com/assets/js/video.js"></script>-->
<!--<script src="https://atnyla.com/assets/js/slick-slider.js"></script>--> 

<script src="https://atnyla.com/assets/js/custom.js"></script> 

<!--<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>-->
<!--<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?skin=desert"></script>-->

<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> 
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> 
   
 
<script>
  //according to loftblog tut
  $(".nav li:first").addClass("active");

  var showSection = function showSection(section, isAnimate) {
    var direction = section.replace(/#/, ""),
      reqSection = $(".section").filter(
        '[data-section="' + direction + '"]'
      ),
      reqSectionPos = reqSection.offset().top - 0;

    if (isAnimate) {
      $("body, html").animate(
        {
          scrollTop: reqSectionPos,
        },
        800
      );
    } else {
      $("body, html").scrollTop(reqSectionPos);
    }
  };

  var checkSection = function checkSection() {
    $(".section").each(function () {
      var $this = $(this),
        topEdge = $this.offset().top - 80,
        bottomEdge = topEdge + $this.height(),
        wScroll = $(window).scrollTop();
      if (topEdge < wScroll && bottomEdge > wScroll) {
        var currentId = $this.data("section"),
          reqLink = $("a").filter("[href*=\\#" + currentId + "]");
        reqLink
          .closest("li")
          .addClass("active")
          .siblings()
          .removeClass("active");
      }
    });
  };

  $(".main-menu, .responsive-menu, .scroll-to-section").on(
    "click",
    "a",
    function (e) {
      e.preventDefault();
      showSection($(this).attr("href"), true);
    }
  );

  $(window).scroll(function () {
    checkSection();
  });
</script>
<script>
  $(document).ready(function () {
    $("#side-bar-toogle-btn").click(function () {
      $("#sidebar-list-group").toggle("slow");
    });
  });
</script> 
    
<script async src="https://fundingchoicesmessages.google.com/i/pub-7357847575760859?ers=1" nonce="P8qLHGFgH5IxNN3G6pLnUA"></script><script nonce="P8qLHGFgH5IxNN3G6pLnUA">(function() {function signalGooglefcPresent() {if (!window.frames['googlefcPresent']) {if (document.body) {const iframe = document.createElement('iframe'); iframe.style = 'width: 0; height: 0; border: none; z-index: -1000; left: -1000px; top: -1000px;'; iframe.style.display = 'none'; iframe.name = 'googlefcPresent'; document.body.appendChild(iframe);} else {setTimeout(signalGooglefcPresent, 0);}}}signalGooglefcPresent();})();</script>


<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<script>
// prettyPrint();
</script>
  
</body>
</html>