下列语句定义pf为指向foat类型变量f的指针, 是正确的。 A、 float f,“pf=f;B、 float f,*pf=&f; C、 float*pf=&f,;D、 float f,pf=f; 对于如下说明,语法和语义都正确的赋值是 ntc,*s,a[]={1,3,5}; A、c=*s B、S[0]=a[0 C、S=&a[1 D、C=a
下列语句定义pf为指向float类型变量f的指针, _____是正确的。 A、float f, *pf = f; B、float f, *pf = &f; C、float *pf = &f, f; D、float f, pf = f; 对于如下说明,语法和语义都正确的赋值是 _____。 int c, *s, a[ ]={1, 3, 5}; A、c=*s; B、 s[0]=a[0]; C、s=&a[1]; D、 c=a;
4、构造类型和指针类型的混合定义及应用 (1)熟练掌握指针、数组和地址间的关系 ntc]={1,3,5}; int *k=C+1 printf("%d,*++k) char str[="hellotworld\n printf( %d, %cIn", sizeof(str), (str+10))
4、构造类型和指针类型的混合定义及应用 (1) 熟练掌握指针、数组和地址间的关系 int c[ ]={1, 3, 5}; int *k=c+1; printf("%d", *++k); char str[ ]="hello\tworld\n"; printf("%d, %c\n", sizeof(str), *(str+10));
(2)熟练掌握指针数组 写出下列程序段的输出结果。 char *stl]fone two", three, four"; printf( %sIn",*(st+ 3) +1)
(2) 熟练掌握指针数组 写出下列程序段的输出结果。 char *st[ ]={"one","two","three","four"}; printf("%s\n",*(st+3)+1);
(3)熟练掌握结构数组 输入某班50位学生的姓名及数学、英语成绩, 计算每位学生的平均分;然后输出平均分最高 的学生的姓名及其数学和英语成绩。 include stdio h> define size 50 struct studentt char name[ 10]; int math, eng float aver
(3) 熟练掌握结构数组 输入某班50位学生的姓名及数学、英语成绩, 计算每位学生的平均分;然后输出平均分最高 的学生的姓名及其数学和英语成绩。 #include <stdio.h> #define SIZE 50 struct student{ char name[10]; int math,eng; float aver; };