试题通
试题通
APP下载
首页
>
IT互联网
>
信息技术知识竞赛c语言
试题通
搜索
信息技术知识竞赛c语言
题目内容
(
单选题
)
若有以下定义和语句:double r=99,*p=&r; *p=r;则以下正确的叙述是()。

A、以下两处的*p含义相同,都说明给指针变量p赋值

B、在“double r=99,*p=&r;”中,把r的地址赋值给了p所指的存储单元

C、语句“*p=r;”把变量r的地址值赋给指针变量p

D、语句“*p=r;”取变量r的值放回r中

答案:B

试题通
信息技术知识竞赛c语言
试题通
有以下程序
#include "stdio.h"
main()
{ int a,b,c=246;
a=c/100%9;
b=(-1)&&(-1);
printf("%d,%d\n",a,b);
}
输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346515.html
点击查看题目
以下有关switch语句的正确说法是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034651c.html
点击查看题目
#include
int streql(char *str1,char *str2)
{ while((*str1==*str2)&&(*str1))
{
str1++;
str2++;
}
return((*str1==NULL)&&(*str2==NULL));
}
void main()
{
printf("%d",streql("abc","Abc"));
}
程序的运行结果是 ( ) 。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346509.html
点击查看题目
有以下程序段
  int i,n;
  for(i=0;i<8;i++)
  { n=rand()%5;
  switch (n)
  { case 1:
  case 3:printf("%d\n",n); break;
  case 2:
  case 4:printf("%d\n",n); continue;
  case 0:exit(0);
  }
  printf("%d\n",n);
  }
以下关于程序段执行情况的叙述,正确的是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651c.html
点击查看题目
C语言中文件的存取方式是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346517.html
点击查看题目
有以下程序
#include "stdio.h"
void main( )
{ int n[3][3], i, j;
for(i=0;i<3;i++ )
for(j=0;j<3;j++ )
n[i][j]=i+j;
for(i=0;i<2;i++ )
for(j=0;j<2;j++ )
n[i+1][j+1]+=n[i][j];
printf("%d\n", n[i][j]);
}
执行后的输出结果是( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346505.html
点击查看题目
以下叙述中错误的是 ( )。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034650b.html
点击查看题目
若有如下定义变量:
int k=7,x=12; 则能使值为3的表达式是
()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346508.html
点击查看题目
有以下程序
main()
{int i;
for(i=1;i<=40;i++)
{if(i++%5==0)
if (++i%8==0) printf("%d",i) ;}
printf("\n") ;} 执行后的输出结果是()。
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034651b.html
点击查看题目
下列程序执行后的输出结果是(   )。 #include "stdio.h"
void main()
{
int i;
for(i=1;i+1;i++)
{
if(i>4)
{ printf("%d\n",i);
break;
}
printf("%d\n",i++);
}
}
https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346503.html
点击查看题目
首页
>
IT互联网
>
信息技术知识竞赛c语言
题目内容
(
单选题
)
手机预览
试题通
信息技术知识竞赛c语言

若有以下定义和语句:double r=99,*p=&r; *p=r;则以下正确的叙述是()。

A、以下两处的*p含义相同,都说明给指针变量p赋值

B、在“double r=99,*p=&r;”中,把r的地址赋值给了p所指的存储单元

C、语句“*p=r;”把变量r的地址值赋给指针变量p

D、语句“*p=r;”取变量r的值放回r中

答案:B

试题通
试题通
信息技术知识竞赛c语言
相关题目
有以下程序
#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

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-5ca8-c089-2897e0346515.html
点击查看答案
以下有关switch语句的正确说法是()。

A. break语句是语句中必须的一部分

B. 在switch 语句中可以根据需要使用或不使用break语句

C. break语句在switch 语句中不可以使用

D. 在switch 语句中的每一个case都要用break语句

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-50f0-c089-2897e034651c.html
点击查看答案
#include
int streql(char *str1,char *str2)
{ while((*str1==*str2)&&(*str1))
{
str1++;
str2++;
}
return((*str1==NULL)&&(*str2==NULL));
}
void main()
{
printf("%d",streql("abc","Abc"));
}
程序的运行结果是 ( ) 。

A. 0

B. 1

C. 2

D. 3

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346509.html
点击查看答案
有以下程序段
  int i,n;
  for(i=0;i<8;i++)
  { n=rand()%5;
  switch (n)
  { case 1:
  case 3:printf("%d\n",n); break;
  case 2:
  case 4:printf("%d\n",n); continue;
  case 0:exit(0);
  }
  printf("%d\n",n);
  }
以下关于程序段执行情况的叙述,正确的是( )。

A. for循环语句固定执行8次

B. 当产生的随机数n为4时结束循环操作

C. 当产生的随机数n为1和2时不做任何操作

D. 当产生的随机数n为0时结束程序运行

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6090-c089-2897e034651c.html
点击查看答案
C语言中文件的存取方式是()。

A. 顺序存取

B. 随机存取

C. 顺序存取,随机存取均可

D. 顺序存取,随机存取均不可

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4d08-c089-2897e0346517.html
点击查看答案
有以下程序
#include "stdio.h"
void main( )
{ int n[3][3], i, j;
for(i=0;i<3;i++ )
for(j=0;j<3;j++ )
n[i][j]=i+j;
for(i=0;i<2;i++ )
for(j=0;j<2;j++ )
n[i+1][j+1]+=n[i][j];
printf("%d\n", n[i][j]);
}
执行后的输出结果是( )。

A. 10

B. 8

C. 6

D. 4

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6c48-c089-2897e0346505.html
点击查看答案
以下叙述中错误的是 ( )。

A. gets函数用于从终端读入字符串

B. getchar函数用于从磁盘文件读入字符

C. fputs函数用于把字符串输出到文件

D. fwrite函数用于以二进制形式输出数据到文件

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-54d8-c089-2897e034650b.html
点击查看答案
若有如下定义变量:
int k=7,x=12; 则能使值为3的表达式是
()。

A. x%=(k%=5)

B. x%=(k-k%5)

C. x%=k-k%5

D. (x%=k)-(k%=5)

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-4920-c089-2897e0346508.html
点击查看答案
有以下程序
main()
{int i;
for(i=1;i<=40;i++)
{if(i++%5==0)
if (++i%8==0) printf("%d",i) ;}
printf("\n") ;} 执行后的输出结果是()。

A. 5

B. 24

C. 32

D. 40

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-58c0-c089-2897e034651b.html
点击查看答案
下列程序执行后的输出结果是(   )。 #include "stdio.h"
void main()
{
int i;
for(i=1;i+1;i++)
{
if(i>4)
{ printf("%d\n",i);
break;
}
printf("%d\n",i++);
}
}

A. 1 3 5

B. 1
3
5

C. 1
2
3

D. 1
2
4

https://www.shititong.cn/cha-kan/shiti/0005eb65-536a-6860-c089-2897e0346503.html
点击查看答案
试题通小程序
试题通app下载