For this problem, you have to write a program that reads integers from the standard input (until it gets a negative number) and puts them into an array. After that it finds the number of entries in the array that are greater than or equal to 100 and prints that to the standard output. It should return 0 if the array has no numbers greater than or equal to 100. Note: your program must not print anything else to the standard output.
Answers
Answered by
0
Answer:
It is simple stacking behaviour of compiler for single line short hand expressions.
Stacking here is happening as :
1) a
2) ++a
3) a++
Now value of a is 10, and for stacks its LIFO: hence order of output will be
3) a++ (value 10 printed, then incremented to 11)
2) ++a ( value incremented to 12, then printed 12)
1) a (value 12 printed)
Hence ordered output is:
1) 12
2) 12
3) 10
Similar questions
Math,
20 hours ago
English,
20 hours ago
Computer Science,
8 months ago
English,
8 months ago
English,
8 months ago