当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

有下列函数:int fun(char*s){char*t=s;while(*t++);return(t-s);}该函数的功能是()。A.比较两个字


有下列函数: int fun(char*s) {char*t=s; while(*t++); return(t-s); } 该函数的功能是()。

A、比较两个字符串的大小

B、计算s所指字符串占用内存字节的个数

C、计算s所指字符串的长度

D、将s所指字符串复制到字符串t中

参考答案
您可能感兴趣的试题
  • 有以下程序#include <stdio.h>struct stu{ int num; char name [10];int age;};Void fun(s

  • 有以下程序:int fun(){ static int s=0;s+=1;return s;}main(int argc,char *argv[]){ int n,i=0

  • 有以下程序:#include<stdio.h>void fun(char*t char*s){ while(*t!=O)t++;while((*t++=*s+

  • 设有以下函数: void fun(int n char*s){…} 则下面对函数指针的定义和赋值均正确的是( )。 A.v

  • 设有以下函数:void fun(int n char*$s){……}则下面对函数指针的定义和赋值均正确的是A.void(*pf)(

  • 有以下函数int aaa(char*s){char*t=s;while(*t+t);t--:return(t-s);}以下关于aaa函数的功能叙述