title: Calling main function from another function in C
body: <p>I have a main function that runs a few functions during initialization and then runs a while loop that waits for commands from the UART.</p>
  
  <p>When I see a specific command (let's say reset), I call a function that returns a value. I want to do the following things:</p>
  
  <ol>
  <li>Save the returned value</li>
  <li>Start the main function again with the returned value. The returned value is required during initialization of the functions in main.</li>
  </ol>
  
  <p>I am newbie in C and I am not able to figure out a way save variable value in main. </p>