问题 单项选择题

当在一个报表中列出学生的3门课a、b、c的成绩时,若要对每位学生计算3门课的平均成绩,只要设置新添计算控件的 控制源为( )。

A. 0 8

B. 40 72

C. 4 50

D. 78 50

答案

参考答案:B

解析:在调用过程时,一般主调与被调过程之间有数据传递,即将主调过程的实参传递给被调用的过程,完成实参与形参的结合,然后执行被调过程,在Visual Basic 中,实参与形参的结合有两种方式:即传址与传值。这两种方法的特点如下:  传址的结合过程是,当调用一个过程是,它将实参的地址传给形参,因此在被调用的 过程中,对形的任何操作都变成了对相应实参的操作,因此实参的值会随形参的改变而改变。  传值的结合过程是,当调用一个过程时,系统将实参的值复制给形参并断开了联系,被调用过程中的操作时在形参自己的存储单元中进行的,当过程调用结束时,这些形参所占用的存储单元也同时被释放,因此在过程中对形参的任何操作不会影响实参。而题 中被调过程PCS中有两个形参,两者均为传值方式。主调过程分别把实参x和y传递给 PCS,所以当过程调用结束后,实参x和y的值都没有改变,最后输出的值应为32 42。

选择题
阅读理解

阅读理解。

     Dog training is a business for some people,a serious hobby for others,and aonce-in-a-lifetime

experience for many. Individuals in all of these categories would probably agree that consistency

(一贯 性) is a key element of success from the beginning.

      If puppies are to be socialized,they must learn to control the impulse to use the carpet as a

bathroom,chew shoes,or nip at fingers. The first issue,bathroom training is more easily accomplished

in warm weather. Try to feed your pup outdoors,and after he has finished eating, take him to a spot

where you would like him to eliminate.If he cooperates,praise him generously with words and pats.

Take him to the same spot after each meal,and eventually he will follow this routine himself.

      The sight of a small puppy chewing through a new tennis shoe will make you do well to remove

the stolen shoe from the pup's mouth and firmly say" No" . Provide your pup with some acceptable

toys, such as a ball or a chew toy.

      Until your pup is well trained and trustworthy,don't leave him unattended (无人看管的 ) unless 

 he  is  limited  to  a  small  area. When he is young,you want to be sure someone will praise your pup

or desired behavior and express disapproval when he does some- hing you want to discourage.

      You will want your dog to learn to respond to the commands Come" , " Sit" ,and" Stay" . Again,

consistency and praise will help you achieve this goal. Each time the dog responds as you wish, praise

him. Whenever he ignores your commands,make him do what you commanded and then praise him.

         Negative behavior must be attended to also. You can discipline most dogs without hitting them.

Since they are usually anxious to please,most dogs are duty-punished-by-cruel words and tone of voice.

Remember to be consistent so your dog knows unquestioningly what is acceptable behavior.

     Although the first stages of dog training require a great deal of time and patience,the reward of a

socialized and obedient dog is well worth the effort.

1. Dog training is appropriately attempted by___.

A. professionals                  

B. hobbyists

C. zoologists                      

D. anyone

2. What is negative behavior best handled by?    

A. A slap on the nose.            

B. Tying the dog up.

C. A firm tone of voice.          

D. Starving the dog.

3. The article deals with all of the following EXCEPT___.

A. chewing problems            

B. barking at strangers

C. bathroom training            

D. responding to commands

4. What might be the best title for this passage?   

A. Tips on Training Your Dog.

B. A Good Puppy.

C. A six-Week Program to Train Your Dog.

D. Leave Dog Training to the Professionals.