• 2022-05-29
    下程序的运行结果是:____,____,____。struct atype{ int m;char *pn;}tab[2]={{1,"ab"},{2,"cd"}},*p=tab;void main(){ printf("%d",tab[1].m);printf("%c",*p->pn);printf("%c",*(++p)->pn);}
  • 2# a# c

    内容

    • 0

      以下程序的输出结果为()。#include "stdio.h"struct{int x;char *c;}st[2]={{1,"ab"},{2,"cd"}},*p=st;main(){printf("%c\t",*p->c);printf("%s\n",(++p)->c); }

    • 1

      程序运行结果是。 # include int main (void) { int a = 1, *p; p = &a; printf ("a=%d,*p=%d,", a, *p); *p = 3; printf("a=%d,*p=%d", a, *p); return 0; }

    • 2

      有如下定义: struct { int x; char *y; }sa[2]={{1,"ab"},{2,"cd"}},*p=sa; 则:语句:printf("%s",(++p)->y); 的输出是 。

    • 3

      有程序如下定义,输出结果为____。#include <stdio.h>struct info{ int x,float y;char z} st={10,10.0,’a’};void main( ){ struct st *pa=&st;printf(“%d ”,s.x);printf(“%c “,p->z);printf(“%.2f “,(*p)->y);}

    • 4

      struct {int x; char *y;}tab={1,"ab"},*p=tab; 则:表达式p->;x的结果为【1】。