问题 单项选择题

有以下程序段 char ch; int k; ch='a'; k=12; pnntf("%c,%d,",ch,ch,k); printf("k二%d\n",k); 已知字符a的ASCII码值为97,则执行上述程序段后输出结果是

A.因变量类型与格式描述符的类型不匹配输出无定值

B.输出项与格式描述符个数不符,输出为零值或不定值

C.a,97,12k=12

D.a,97,k=12

答案

参考答案:D

解析: 输出格式控制符%c表示将变量以字符的形式输出;输出格式控制符%d表示将变量以带符号的十进制整型数输出,所以第一个输出语句输出的结果为a,97;第二个输出语句输出的结果为k=12。

单项选择题

Dogs are constantly learning from the reaction of human owners, picking up facial cues and anticipating their owner’s behavior, a new research suggests. The findings, published online in the journal Learning and Behavior, show that dogs essentially are always in training, and help explain how many owners unknowingly teach and reward their dog’s bad behavior.

Research conducted at the University of Florida focused on the role of eye contact and facial cues in influencing canine behavior. Earlier studies have suggested that dogs seem to know when they are being watched and even wait to perform forbidden behavior like digging in the garden when they know their owners aren’t looking. In this study, researchers studied how human cues triggered begging behavior among 35 pet dogs, 18 shelter dogs and 8 wolves raised in captivity. First the animals were taught that the human strangers helping with the experiment were reliable sources of tasty treats. The testers stood close together and called to the animal, and both offered rewards of Spam cubes or Beggin’ Strips treats.

After four rewards, the experiment began. Two testers stood against a fence or wall, about 20 feet apart and with food in their pockets. The dog was held about 20 feet away, equidistant from both testers. In one condition, one tester faced the dog while the other turned her back. In another, a tester held a book near her face, while the other tester held the book in front of her face, as if she were reading. In a third condition, one tester held a bucket near the shoulder, while the other put the bucket over her head, blocking her eyes.

Then, both testers called out to the dogs. All the animals—pet dogs, shelter dogs and wolves—ignored the person whose back was turned and sought food from the person who was looking at them. "The question was, are dogs and wolves responsive to a human’s attentional state" said Monique Udell, an assistant professor of psychology at Flagler College, Fla. But when the testers held books, it was only the domestic dogs who avoided the person who appeared to be reading the book. "In a house where they’re used to people reading books, they are sensitive to those types of cues," said Dr. Udell. Interestingly, in the bucket experiment, the animals, for the most part, were equally likely to seek food from the person with the bucket over her head as the person holding the bucket.

The experiment shows that dogs are tuned into whether humans are paying attention. "Dogs don’t have to read our minds. Dogs read our behavior," said Dr. Udell. Pet owners often get frustrated with bad dog behavior without realizing that they themselves have reinforced it, either by giving the dog a treat when they beg, skipping a bath when they protest or letting them sleep on the bed or couch.

The expression "are tuned into" probably means()

A. be ignorant of

B. be insensitive to

C. be responsive to

D. be oblivious to

多项选择题 案例分析题