AI智能整理导入 AI智能整理导入
×
首页 题库中心 c语言程序设计题库 题目详情
CA85E835B92000012B50FB49F93816B5
c语言程序设计题库
1,073
单选题

以下对结构体变量stul 中成员age 的非法引用是( )。
struct student
{ int age ;
int num;
}stul,*p;
P=&stul;

A
student . age
B
stul . age
C
p ->age
D
( *p ) . age

答案解析

正确答案:A

解析:

结构体与共用体
c语言程序设计题库

扫码进入小程序
随时随地练习

相关题目

单选题

下面程序运行结果是( )
#include
void main(void)
{
for(int nI = 0; nI < 6; nI++)
{
switch(nI % 5)
{
case 0:
printf("*") ;
break;
case 1:
printf("#") ;
break;
case 2:
printf("&") ;
break;
default:
printf("\n") ;
break;
}
}
}

单选题

关于字符串和字符数组的说法正确的是( )

单选题

已知字符 A 的 ASCII 代码值为 65, 以下程序运行时若从键盘输入: B33. 则输出结果是( )
#include
void main(void)
{
char a, b;
a=getchar() ; scanf("%d", &b) ;
a=a-' A' +' 0' ; b=b*2;
printf("%c %c\n", a, b) ;
}

单选题

对字符串赋值正确的是( )

单选题

若一台计算机的字长为 32 位, 则表明该机器( )

单选题

#include
int SUM( int nK )
{
int nS = O;
do
{
nS += nK % 10; nK /= 10;
} while(nK) ;
return nS;
}
void main( void )
{
printf( "%d\t", SUM( 7432 ) ) ;
}
以上程序的输出结果是( )

单选题

关于指针的说法正确的是( )

单选题

#include
void main(void)
{
int i = 0, nB = 1;
while(i < 5)
{
switch(nB)
{
case 1:
case 5:
nB += i;
case 6:
nB++;
case 10:
nB += 3;
default:
;
}
i++;
}
printf("i = %d, nB = %d\n", i, nB) ;
}
以上程序的执行结果是( )

单选题

下列代码执行后的结果是( )
int Fun(int nA, int * nB)
{
int nC = 0;
nA += 10;
*nB += 10;
return *nB + nA;
}
void main(void)
{
int nA = 1;
int nB = 2;
int nC = 3;
nC = Fun(nA, &nB) ;
printf("%d, %d, %d", nA, nB, nC) ;
}

单选题

函数 function( int a ) 的功能是判断指定的正整数是否为素数, 若是返回 1, 否则返回 0。
int function( int a )
{ int yes, i;
i = 2;
yes = 1;
while
( i <= a/2 && __(1) __) {
if (__(2) __) yes = 0;
i++;
}
return yes;
}
___________中应填入的语句是( )

关闭
专为自学备考人员打造
试题通
自助导入本地题库
试题通
多种刷题考试模式
试题通
本地离线答题搜题
试题通
扫码考试方便快捷
试题通
海量试题每日更新
试题通
欢迎登录试题通
可以使用以下方式扫码登陆
试题通
使用APP登录
试题通
使用微信登录
xiaochengxu
联系电话:
400-660-3606
xiaochengxu