What are each of the standard files and what are they normally associated with?

Q

They are the standard input file, the standard output file and the standard error file. The first is usually associated with the keyboard, the second and third are usually associated with the terminal screen.

✍: Guest

A

Detemine the code below, tell me exectly how many times is the operation sum++ performed ?

for ( i = 0; i < 100; i++ )
for ( j = 100; j > 100 - i; j–)
sum++;

(99 * 100)/2 = 4950
The sum++ is performed 4950 times.

2012-04-05, 2707👍, 0💬