Consider the following program segment:
main ( )
{
int counter = 40;
for(; counter;)
counter.....;
printf("%d", counter);
The following program segment:
main ( )
{
int counter = 40;
for(; counter;)
counter.....;
printf("%d", counter);
}
Output:-
0.
A program counter is a register in a computer processor that contains the address (location) of the instruction being executed at the current time. As each instruction gets fetched, the program counter increases its stored value by 1.