单项选择题

一个函数带有参数说明时,则参数的默认值应该在()中给出。

A.函数定义 
B.函数声明 
C.函数定义或声明 
D.函数调用

<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <iostream> #include <math> using namespace std; class point private: double x; double y; public: point(double a,double b) x=a; y=b; friend double distance(point a,point b) ; ; double distance(point a,point b) return sqrt ((a.x-b.x)* (a.x-b.x)+(a.y-b.y)*(a.y-b.y)); int main ( ) point pl(1,2); point p2 (5, 2); cout<<distance (pl,p2) <<end1; return 0; 程序运行后的输出结果是()

A.1  
B.5   
C. 4  
D. 6

单项选择题
有如下函数模板定义: template<typename T1,typename T2,typename T3> T2 plus T1 t1,T3 t3)return t1+t3; 则以下调用中正确是
A) plus(3,5L);
B) plus<>(3,5L);
C) plus<int>(3,5L);
D) plus<int,double>(3,5L);
相关试题
  • 最简单的交换排序方法是( )。
  • 设栈S的初始状态为空。元素a,b,c,d,e,...
  • 在对象方法中,一个对象请求另一个对象为其...
  • 以下程序的输出结果是( )。#include ...
  • 下列for循环语句执行的次数是 _____...