有什么新鲜事与大家分享?
  • 还可以输入
  • 280

日新月异 5 2021年07月06日 19时48分

fun函数的功能是首先对a所指的N行N列的矩阵找出各行中最大的数,再求这N个最大值中最小的那个数作为函数值返回,请填空。#include #define N 100int fun(int(*a)){ int row,col,max,min; for(row=0;row正确答案:max<a,max<min本题中的第一空要求判断出每一行中的最大数,应该填写条
查看全文

日新微博 (日新微博分享新鲜事!) 2021年06月25日 15时51分

有如下程序:
#include
#include
using namespace std;
int main(){
int S[]={123,234};
cout正确答案:B解析:因为循环之前执行了cout<<fight<<setfill(‘*’)<<setw(6);,所以第一次循环输出***123,而第二次循环则正常输出234。总共输出“***123\n234”,故选B)。
[/
查看全文

日新微博 (日新微博分享新鲜事!) 2021年06月24日 21时18分

有如下程序:
#include
#include
using std::cout;
class Point{
public:
friend double distance(const Point &p); //P距原点的距离
Point(int xx=0,int yy=0):x(xx),Y(YY){}//①
private:
int x,y;
};
double distance(const Point &p){ //②
return sqrt(P.x*P.x+P
查看全文

日新微博 (日新微博分享新鲜事!) 2021年06月24日 21时01分

有如下程序:
#include
#include
using namespace std;
int main(){
cout正确答案:A

日新微博 (日新微博分享新鲜事!) 2021年06月19日 20时04分

有如下程序:
#include
#include
using namespace std;
class XCF{
int a;
public:
XCF(int aa=O):a(aA){cout正确答案:B解析:在主函数中XCFd1(5),d2(d1);,d1调用了第一个构造函数,输出1;d2调用了拷贝构造函数,输出2;xcF*pd=IleW XCF’(8);调用了构造函数,输出l;cout<Geta( )
查看全文

日新微博 (日新微博分享新鲜事!) 2021年06月17日 18时26分

下列程序是用来判断数组中特定元素的位置所在的。
#include
#include
int fun(int *s, int t, int *k)
{ int i;
*k=0;
for(i=0;i正确答案:D解析:本题中直接使用指针变量k,但在使用时要注意对k的指针运算。此外,一开始应知道*k的值为数组中的某一下标值,即*k=0,本函数的功能是找出数组中的最大
查看全文

日新 2021年06月07日 15时01分

下列程序的运行结果为【14】
#include
#include
struct A
{int a;char b;double c;};
void f (struct A *t);
main()
{struct A a=(1001,”ZhangDa”,1098,0);
f(&a);printf(“&d,&s,&6,if\n”,a.a,a.b,a.c);
}
void f(struct A *t)
{strcpy(t->b,”ChangRong”); }

正确答案
查看全文

手机玩微博

手机版 手机端
Powered by 日新微博 © 2018 - 2020 日新网