题目内容

若有以下程序 main( ) { int p,a=5; if(p=a!=0) printf("%d\n",p); else printf("%d\n",p+2); } 执行后输出结果是【 】。

查看答案
更多问题

Many theories concerning the causes of juvenile delinquency (crimes committed by young people) focus either on the individual or on society as the major contributing influence. Theories (21) on the individual suggest that children engage in criminal behavior (22) they were not sufficiently penalized for previous misdeeds or that they have learned criminal behavior through (23) with others. Theories focusing on the role of society suggest that children commit crimes in (24) to their failure to rise above their socioeconomic status, (25) as a rejection of middle-class values. Most theories of juvenile delinquency have focused on children from disadvantaged families, (26) the fact that children from wealthy homes also commit crimes. The latter may commit crimes (27) lack of adequate pa- rental control. All theories, however, are tentative and are (28) to criticism. Changes in the social structure may indirectly (29) juvenile crime rates. For example, changes in the economy that (30) to fewer job opportunities for youth and rising unemployment (31) make gainful employment increasingly difficult to obtain. The resulting discontent may in (32) lead more youths into criminal-behavior. Families have also (33) changes these years. More families consist of one-parent households or two working parents; (34) , children are likely to have less supervision at home (35) was common m the traditional family structure. 21()

A. before
B. unless
C. until
D. because

有以下程序,其功能是:以二进制"写"方式打开文件d1.dat,写入l-100这100个整数后关闭文件。再以二进制"读"方式打开文件d1.dat,将这100个整数读入到另一个数组b中,并打印输出。请填空。 #include main() {FILE *fp; int i,a[100],b[100]; fp=fopen("d1.dat","wb"); for(i=O;i<100;i++), a[i]=i+1; fwrite(a,sizeof(int),100,fp); fclose(fp); fp=fopen("d1.dat",【 】); fread(b ,sizeof(int),100,fp); fclose(fp); for(i=0;i<100;i++)prinff("%d\n",b[i]); }

Trade relationships between the two countries will improve if their()leaders could agree on the proposed quotas.

A. respectable
B. respective
C. respectful
D. respecting

以下程序企图把从终端输入的字符输出到名为abc.txt的文件中,直到从终端读入字符#号时结束输入和输出操作,但程序有错。 #include <stdio.h> main( ) { FILE *fout; char ch; fout=fopen(’’abc.txt’’,’’w’’); ch=fgetc(stdin); while(ch!=’’#’’) { fputc(ch,fout); ch =fgetc(stdin); } fclose(fout); } 出错的原因是( )。

A. 函数fopen调用形式有误
B. 输入文件没有关闭
C. 函数fgetc调用形式有误
D. 文件指针stdin没有定义

答案查题题库