Difference between void and int

what is the difference between void and int while defining a function?

int and void are return type of function

A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function . Functions are used to perform certain actions, and then give some output(not mandatory).

which type of output the function returns is known as its return type

if it is int means function return integer values like 2,3,4 etc
syntax: return value;

if it is void means funciton will not return anything just do its work
syntax: return ;

i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved
if you have more doubts regarding this feel free to ask