更多“有以下程序: #include "stdio.h" int main() { int a=3,*p; p=&a; printf(" a=%d,*p=%d\n",a,*p); return 0;…”相关的问题
第1题
下列程序的输出结果是()。 #include main() { int a=2,b=3,P; p=f(a,b); printf(”%d”,p); } int f(a,b) { int c; if(a>b)c=1; else if(a==b)c=0; else c=-l; return(c); }
点击查看答案
第2题
#include<stdio.h> int main(void) { int a[]={1,2,3,4,5}; printf("%d",sizeof(a)); return 0; } 【假设】在该环境中整型占4字节
点击查看答案
第3题
有如下程序段: if (q%p==0) a=q/p; printf("%d=%d*%d",q,p,a); //输出因式分解q=p*a else printf("不能整除"); 如果q=8,p=2,则输出( )。
A、该段程序有语法错误,不能执行。
B、q=p*a
C、8=2*4
D、不能整除
点击查看答案
第4题
有以下程序 #include<stdio.h> void f(int *p); main() {int a[5]={1,2,3,4,5},*r=a; f(r);printf(”%d\n”;*r); } void f(int *p) {p=p+3;printf(”%d,”,*p);}
点击查看答案
第5题
在${FLUME_HOME}/bin 下运行 ./flume-ng agent -n a1 -c conf -f ../conf/spooldir.conf -Dflume.root.logger=INFO,console 其中:-n a1是( )
A、指定配置目录
B、指定agent的名字
C、执行agent具体的的配置文件
D、配置文件
点击查看答案
第6题
有以下程序: #include <stdio.h> void main() { char a[][10] = {"Morning", "Afternoon", "Evening", "Night"}; printf("%s\n",a[1]); } 程序运行后的输出结果是__________。
A、Morning
B、Afternoon
C、Evening
D、Night
点击查看答案
第7题
以下程序段的输出结果是 。 int *var,ab; ab=100; var=&ab; ab=*var+10; printf("%d\n",*var);
点击查看答案
第8题
在C语言中,一个指针变量代表的是_____。
A、变量的名称
B、变量的地址
C、变量的类型
D、变量的值
点击查看答案
第9题
若有定义int a[5],*p=a,则利用指针p对数组元素a[2]进行访问,正确的是( )。
A、*p++
B、*(p+1)
C、*(p+2)
D、*p
点击查看答案
第10题
设int a[10]={1,2,3}; 则*(a+3)的值是 。
点击查看答案