Ask Question

Write the definition of a function named newbie that receives no parameters and returns 1 the first time it is invoked (when it is a "newbie"), and that returns 0 every time that it is invoked after that.

+5
Answers (1)
  1. 2 March, 16:27
    0
    Int newbie (void) {

    static int a;

    if (! a) {a=1; return 1; }

    return 0;

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write the definition of a function named newbie that receives no parameters and returns 1 the first time it is invoked (when it is a ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers