题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2024-06-28 05:27:42

[单选题]在C程序中,main函数的位置( )
A.必须放在所有函数定义之前
B.必须放在所有函数定义之后
C.必须放在它所调用的函数之前
D.可以任意

更多"[单选题]在C程序中,main函数的位置( )"的相关试题:

[单选题]有以下程序 main() {char c1,c2,c3,c4,c5,c6; scanf("%c%c%c%c",&c1,&c2,&c3,&c4); c5=getchar(); c6=getchar(); putchar(c1);putchar(c2); printf("%c%c\n",c5,c6); } 程序运行后,若从键盘输入(从第1列开始) 123<回车> 45678<回车> 则输出结果是()。
A.1267
B.1256
C.1278
D.1245
[单选题]有以下程序 #include "stdio.h" void main() { int c; while((c=getchar())!='\n') switch(c -'2') { case 0: case 1: putchar(c+4); case 2: putchar(c+4);break; case 3: putchar(c+3); default: putchar(c+2);break; } printf("\n"); } 通过键盘输入446755,执行后的输出结果是( )。
A.888988
B.668966
C.88898787
D.66898787
[单选题]有以下程序 #include main() {int c[3]={0},k,I; while((k=getchar())!=’\n’) c[k-‘A’]++; for(i=0;i<3;i++) printf(“%d”,c[i]); printf(“\n”); } 若程序运行时从键盘输入ABCACC<回车>,则输出结果为 ( ) 。
A.211
B.212
C.213
D.214
[单选题]以下程序的主函数中调用了在其前面定义的fun函数 #include main() {double a[15],k; k=fun(a); } 则以下选项中错误的fun函数首部是()。
A.double fun(double a[15])
B.double fun(double *a)
C.double fun(double a[])
D. double fun(double a)
[单选题]有以下程序 #include "stdio.h" main() { int a,b,c=246; a=c/100%9; b=(-1)&&(-1); printf("%d,%d\n",a,b); } 输出结果是()。
A.2,1
B.3,2
C.4,3
D.2,-1
[单选题]C#的每一个应用程序应该有一个入口方法,称为Main,该方法必须被声明为( )
A.private static
B.public static
C.protect static
D.protected static
[多选题]main方法是Java Application程序执行的入口点,关于main方法的方法头以下不合法的是( )?
A.public static void main( )
B.public static void main( String args[] )
C.public static int main(String [] arg )
D.public void main(String arg[] )
[单选题]如果程序中用到标准库函数log(),那么该程序应含下面哪条语句( )。
A.#include ”stdio.h”
B.#include ”math.h “
C. #include ”string.h”
D.#include ”stdlib.h”
[单选题]有以下程序 main() {int a=1,b=3,c=5; int *p1=&a,*p2=&b,*p=&c; *p=*p1*(*p2); printf("%d\n",c); } 执行后的输出结果是()。
A.1
B.2
C.3
D.4
[单选题]以下程序的输出结果是( )。
Void main()
{
Int a=2,b=-1,c=2;
If(aIf(b<0)
C=0;
Else
C++;
Printf("%d\n",c);
}
A.0
B.1
C.2
D.3
[单选题]有以下程序 main() {int a=0,b=0,c=0,d=0; if(a=1) b=1;c=2; else d=3; printf("%d,%d,%d,%d\n",a,b,c,d); } 程序输出()。
A.0,1,2,0
B.0,0,0,3
C.1,1,2,0
D.编译有错
[单选题]以下程序的输出结果是()。 main() { int a=4,b=5,c=0,d; d=!a&&!b||!c; printf("%d\n",d);}
A.1
B.0
C.非0数
D.-1
[单选题]有以下程序:
void main()
{
int x;
scanf("%d", &x);
if (x <= 3);
if (x != 10)
printf("%d\n", x);
}
程序运行时,输入的值在哪个范围内才会有输出结果( )。
A.不等于10的整数
B.大于3且不等10的整数
C.大于3或等于10的整数
D.小于3的整数
[单选题]有以下程序:
Void main()
{
char a[10] = "abcd";
printf("%d,%d\n", strlen(a), sizeof(a));
}
程序运行后的输出结果是( )。
A.7,4
B.4,10
C.8,8
D.10,10
[单选题]有以下程序, 程序的运行结果是( )。
Void main()
{
int i, j;
for (i = 3; i >= 1; i--)
{
for (j = 1; j <= 2; j++)
for (j = 1; j <= 2; j++)
printf("%d", i + j);
}
}
A.234345
B.432543
C.233445
D.453423
[单选题]有下列程序:
Void main()
{
int s[12] = { 1, 2, 3, 4, 4, 3, 2, 1, 1, 1, 2, 3 }, c[5] = { 0 }, i;
for (i = 0; i < 12; i++)
c[s[i]]++;
for (i = 1; i < 5; i++)
printf("%d", c[i]);
printf("\n");
}
程序的运行结果是( )。
A.1 2 3 4
B.2 3 4 4
C.4 3 3 2
D.1 1 2 3
[单选题]以下程序调用findmax函数返回数组中的最大值 findmax(int *a,int n) { int *p,*s; for(p=a,s=a; p-a if (______) s=p; return(*s); } main() { int x[5]={12,21,13,6,18}; printf("%d\n",findmax(x,5)); } 在下划线处应填入的是()。
A.p>s
B.*p>*s
C.a[p]>a[s]
D.p-a>p-s
[单选题]一次函数、二次函数、反比例函数的学习都是按照列表、描点、连线得到函数的图像,然后根据函数的图像研究函数的性质,这种研究方法主要体现的数学思想是()
A.演绎
B.数形结合
C.抽象
D.公理化
[单选题]正态分布的随机变量,其概率密度函数中,其函数图在水平X轴上的位置由(____)来确定。
A.μ
B.σ
C.σ/μ
D.σ*μ

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码