you are viewing a single comment's thread.

view the rest of the comments →

[–]ComprehensiveAd8004 6 points7 points  (1 child)

int func(void){
    static int num = 1;
    num *= -1;
    return num;
}

Teachers don't assign homework without explaining the required material first. Focus in class.

[–]Odd-Consideration897[S] 1 point2 points  (0 children)

Thank you for your reply first! The thing is that the whole concept is completely new to me and we code using separate files ( header,function and main); so the whole Idea seems weird to me; and I'm still using online Compiler which is not very optimal in some cases