APP下载
首页
>
文学知识
>
C语言程序设计题库
搜索
C语言程序设计题库
题目内容
(
填空题
)
15.已有定义“char ch='b';”,则表达式ch=ch-'a'+'A'的值为字符________的编码。

答案:空

C语言程序设计题库
45.已知函数f的定义如下:
void f( )
{ int i;
for(i=0; i<y; i++)
x[i]+=y;
}
若main()函数中有声明“int a[10]={10};”及调用函数f的语句,则调用函数f的正确形式是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-5708-c003-bc7499099f00.html
点击查看题目
16.下面程序运行时输出结果是()。
#include
int main()
{ int t=1, n=235;
do
{ t*=n%10;
n/=10;
}while( );
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-ec08-c003-bc7499099f00.html
点击查看题目
3.下面函数定义中正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-e9a8-c003-bc7499099f00.html
点击查看题目
3.本程序的功能是:验证在7~2000之间的所有素数中存在这样的两个素数,它们的差恰好是1898。
#include
int main()
{ int i,j,a[1000],k=0,m,n,flag=0;
for(i=7;i<2000;i+=2)
{for(j=2;j<=i/2;j++)
if(j%i==0)( (6) );
if(j>i/2)
a[k++]=i;
}
for(i=0;i<k-1;i++)
for(j=1;j<k;j++)
if(( (7) )==1898)
{m=i;n=j;( (8) ); break;}
if( )
printf( );
else
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f3-7690-c003-bc7499099f00.html
点击查看题目
24.下面程序运行后的输出结果是________。
#include
#include
int count( )
{int k=0;
if(str[k]== '\0') return 0;
while(
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-b8b0-c003-bc7499099f00.html
点击查看题目
9.下面叙述中正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-a5b8-c003-bc7499099f00.html
点击查看题目
9.若有函数定义int fun() {int a=4, b=3, c=2; return a, b, c;},则调用函数fun后的返回值是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-ddf0-c003-bc7499099f00.html
点击查看题目
3.下列运算符中,优先级最低的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-ea38-c003-bc7499099f00.html
点击查看题目
10. 若有定义“long a, b”且变量a和b都需要通过键盘输入获得初值,则下列语句中正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-2300-c003-bc7499099f00.html
点击查看题目
11.下面程序运行后输出的结果是________。
#include
int main()
{ int x=3;
do
{printf("%3d", x=x-3);
}while( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-dc68-c003-bc7499099f00.html
点击查看题目
首页
>
文学知识
>
C语言程序设计题库
题目内容
(
填空题
)
手机预览
C语言程序设计题库

15.已有定义“char ch='b';”,则表达式ch=ch-'a'+'A'的值为字符________的编码。

答案:空

分享
C语言程序设计题库
相关题目
45.已知函数f的定义如下:
void f( )
{ int i;
for(i=0; i<y; i++)
x[i]+=y;
}
若main()函数中有声明“int a[10]={10};”及调用函数f的语句,则调用函数f的正确形式是( )。

A.  f(a[],a[0]);

B.  f(a[0],a[0]);

C.  f(&a[0],a[0]);

D.  f(a[0],&a[0]);

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-5708-c003-bc7499099f00.html
点击查看答案
16.下面程序运行时输出结果是()。
#include
int main()
{ int t=1, n=235;
do
{ t*=n%10;
n/=10;
}while( );
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-ec08-c003-bc7499099f00.html
点击查看答案
3.下面函数定义中正确的是( )。

A.  double fun(double f1, double f2){ }

B.  double fun(double f1; double f2){ }

C.  double fun(double f1, double f2); { }

D.  double fun(double f1, f2){ }

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-e9a8-c003-bc7499099f00.html
点击查看答案
3.本程序的功能是:验证在7~2000之间的所有素数中存在这样的两个素数,它们的差恰好是1898。
#include
int main()
{ int i,j,a[1000],k=0,m,n,flag=0;
for(i=7;i<2000;i+=2)
{for(j=2;j<=i/2;j++)
if(j%i==0)( (6) );
if(j>i/2)
a[k++]=i;
}
for(i=0;i<k-1;i++)
for(j=1;j<k;j++)
if(( (7) )==1898)
{m=i;n=j;( (8) ); break;}
if( )
printf( );
else
printf( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f3-7690-c003-bc7499099f00.html
点击查看答案
24.下面程序运行后的输出结果是________。
#include
#include
int count( )
{int k=0;
if(str[k]== '\0') return 0;
while(
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f5-b8b0-c003-bc7499099f00.html
点击查看答案
9.下面叙述中正确的是( )。

A.  break语句只能用于switch语句体中

B.  continue语句的作用是:使程序的执行流程跳出包含它的所有循环

C.  break语句只能用在循环体内和switch语句体内

D.  在循环体内使用break语句和continue语句的作用相同

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-a5b8-c003-bc7499099f00.html
点击查看答案
9.若有函数定义int fun() {int a=4, b=3, c=2; return a, b, c;},则调用函数fun后的返回值是( )。
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f4-ddf0-c003-bc7499099f00.html
点击查看答案
3.下列运算符中,优先级最低的是( )。

A.  *

B.  !=

C.  +

D.  =

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-ea38-c003-bc7499099f00.html
点击查看答案
10. 若有定义“long a, b”且变量a和b都需要通过键盘输入获得初值,则下列语句中正确的是( )。

A.  scanf("%ld%ld,&a,&b");

B.  scanf("%d%d",a,b);

C.  scanf("%d%d",&a,&b);

D.  scanf("%ld%ld",&a,&b);

https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f0-2300-c003-bc7499099f00.html
点击查看答案
11.下面程序运行后输出的结果是________。
#include
int main()
{ int x=3;
do
{printf("%3d", x=x-3);
}while( );
return 0;
}
https://www.shititong.cn/cha-kan/shiti/0005e1ec-b3f1-dc68-c003-bc7499099f00.html
点击查看答案
试题通小程序
试题通app下载