单项选择题

有以下程序:
#inelude <stdio.h>
main( )
int i,j,x=0;
for(i=0;i<2;i++ )
x++;
for(j=0;j<=3;j ++)
fi(j%2) continue;
x++;
x++;
pfinff( "x = % d\n",x); 程序执行后的输出结果是( )。

A.x=4
B.x=8
C.x=6
D.x=12
<上一题 目录 下一题>
热门 试题

单项选择题
执行以下程序后,test.txt文件的内容是(若文件能正常打开) ( )。#include <stdio.h>#include <stdlib.h>main( ) FILE * fp; char * s1 = Fortran , * s2 = Basic ; if((fp = fopen( test. txt , wb )) = = NULL) prinff( Can’t open test. txt file n ); exit(1); fwrite( s1 ,7,1 ,fp); * 把从地址s1开始到7个字符写到fp所指文件中* fseek(fp,OL,SEEK_SET); *文件位置指针移到文件开头* fwrite (s2,5,1,fp); felose (fp);
A.Basiean
B.BasieFortran
C.Basic
D.FortranBasie
单项选择题
现有以下结构体说明和变量定义,如图所示,指针P,q,r分别指向一个链表中连续的三个结点。 struct node char data; struct node *next; *p,*q,*r; 现要将q和r所指结点交换前后位置,同时要保持链表的连续,以下不能完成此操作的语句是( )。
A.q->next=r->next;p->next=r;r->next=q;
B.p->next=r;q->next=r->next;r->next=q;
C.q->next=r->next;r->next=q;p->next=r;
D.r->next=q;P->next=r;q->next=r->next;
相关试题
  • 以下程序中函数fun()的功能是构成一个如...
  • 当运行以下程序时,输入abcd,程序的输出结...
  • 以下程序用于判断a,b,c能否构成三角形,...
  • 以下程序的功能是:输出100以内(不含1...
  • 若变量a,b已定义为int类型并分别赋值21...