Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values. Otherwise, for local variables you cannot be sure cannot be sure what their initial value is. (Global variables are implicitly initialized implicitly initialized to zero if not explicitly initialized.)
Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values. Otherwise, for local variables you cannot be sure what their initial value is. (Global variables are implicitly initialized to zero if not explicitly initialized.)
Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values. Otherwise, for local variables you cannot be sure what their initial value is. (Global variables are implicitly initialized to zero if not explicitly initialized.)
Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values. Otherwise, otherwisefor local variables you cannot be sure what their initial value is. (Global variables are implicitly initialized to zero if not explicitly initialized.)
Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values, otherwise you cannot be sure what their initial value is.
Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values. Otherwise, for local variables you cannot be sure what their initial value is. (Global variables are implicitly initialized to zero if not explicitly initialized.)
Assume you want the clock to start at 08:42:21, change
int seconds, minutes, hours;
to
int seconds = 21, minutes = 42, hours = 8;
Note that you should always also initialize (as in the second case above), and not only declare (as in the first case) all variables before you first read their values, otherwise you cannot be sure what their initial value is.