what is the difference between static int and int?
int is a datatype for a variable storing integer values. static int is a variable storing integer values which is declared static. ... But if we declare an int variable in a function also as static, then that variable will not get destroyed as the function ends and will not get destroyed until the program ends.