问题
单项选择题
对表达式for(表达式1;;表达式3)可理解为
A.for(表达式1;0;表达式3)
B.for(表达式1;1;表达式3)
C.for(表达式1;表达式3;)
D.for(;;表达式3)
答案
参考答案:B
解析: 本题中,若要保证for表达式能正常进行,首先要保证第2个表达式的条件判断值应该为真,从而保证循环进行。
对表达式for(表达式1;;表达式3)可理解为
A.for(表达式1;0;表达式3)
B.for(表达式1;1;表达式3)
C.for(表达式1;表达式3;)
D.for(;;表达式3)
参考答案:B
解析: 本题中,若要保证for表达式能正常进行,首先要保证第2个表达式的条件判断值应该为真,从而保证循环进行。
Hunter and Sally went down the street with their mother. They could buy a pet today. “I cannot wait to see the pets!” Sally said. She wanted a cat. Hunter wanted a frog or a snake. They went into the pet shop. “Look! That rabbit made a hole to hide in,” Sally said. “Look at those two cats,” said Hunter. Their cage was on the floor. The small and brown cats were asleep on each other. Sally leaned over the cage. She wanted a better look. The gold necklace she had around her neck came loose. It fell into the cage. It woke up the cats. “Oh no!” Sally cried. “I lost my necklace! It is in the cage!” Then the shopkeeper came. He opened the cage, and took out the necklace. At last, they bought two cats and took them home.
|