求C++大神。14个选择题,100分,谢谢啊!急!

作者&投稿:线咬 (若有异议请与网页底部的电邮联系)
C++考试 50选择题 要求全对 一个2分 一共100分~

怎么多呢,在这里留下答案吗?
前面两个你做了,我就不看了,我接着第三题往下写答案,在这儿写啦,不懂可以hi我啦


3,参数个数不同,参数类型不同
4,普通成员函数调用来处理
5,构造函数
6,类型,变量名,初始化
7,const
8,布尔表达式
9,5
10,函数调用,递归
11,main函数
12,-30
13,0
14,36
15,(这个是15题,你写成23了..)a<c && b<c
16,true
17 , 继承,多态
18 3,5,7
19 private,protected
20 1
21 inline
22 **
23 a>c || b >c
24 4字节 1字节
25 a
26 false
27 单继承
28 析构函数
29 私有继承,保护继承
30 /*..*/
31 for语句,do。。while语句。
32 静态函数
33 重载
34 传地址
35 1
36 3
37 break
38 4字节
39 continue
40 long
41 120
42 ;(分号)
43 8进制
44 函数名与类名相同
45 ::
46 ++,三
47 switch
48 实参
49 字符数组
50 static

虽然都很简单,但是敲了半天,不懂可以hi我,分给我啦,虽然分数是浮云~~

现作的, 有bug的话站内短信我

要处理的文件必须先改成英文名( 只含ASCII的名字 )
fstream不能直接打开中文名文件, 而setlcale和locale::global也会造成不能显示或报错( 网上的方法和我自己尝试都不行 ), 我也不想用c或api来代替, 只能凑合一下了; 或者你自己改下代码, 用其他文件打开方式


#include
#include
#include
#include
using namespace std;

class FileWordReplacer
{
protected:
static FileWordReplacer *singleInstance;
ifstream fileIn;
ofstream fileOut;

FileWordReplacer(){}
string& StringReplace( string &szSentence, string wordOld, string wordNew ) const;
string& StringReplaceEx( string &szSentence, string wordOld, string wordNew ) const;
string& StringToUper( string &szSource ) const;

public:
static FileWordReplacer* GetInstance()
{
if( NULL == singleInstance )
return singleInstance = new FileWordReplacer;
return singleInstance;
}

bool FileReplace( string szFileName, string wordOld, string wordNew, bool bDiv );

};

bool FileWordReplacer::FileReplace( string szFileName, string wordOld, string wordNew, bool bDiv )
{
fileIn.rdbuf()->open( szFileName.c_str(), ios::in );
if( !fileIn.is_open() )
{
cerr << "File does'nt exist." << endl;
return false;
}

fileOut.rdbuf()->open( (szFileName + "_").c_str(), ios::out );

string szRead;
while( getline( fileIn, szRead ) )
fileOut
<< (bDiv ? StringReplace( szRead, wordOld, wordNew ) : StringReplaceEx( szRead, wordOld, wordNew ) )
<< endl;

fileIn.rdbuf()->close();
fileOut.rdbuf()->close();

string szCmd = "del " + szFileName;
system( szCmd.c_str() );
szCmd = "ren " + szFileName + "_ ";
size_t nPos = szFileName.find_last_of('\\') + 1;
szCmd += szFileName.substr( nPos, szFileName.size() - nPos );
system( szCmd.c_str() );

return true;
}

string& FileWordReplacer::StringReplace( string &szSentence, string wordOld, string wordNew ) const
{
size_t nPos = 0;
while( string::npos != (nPos = szSentence.find( wordOld, nPos)) )
{
szSentence.replace( nPos, wordOld.size(), wordNew );
nPos += wordNew.size();
}

return szSentence;
}

string& FileWordReplacer::StringReplaceEx( string &szSentence, string wordOld, string wordNew ) const
{
string szUper = szSentence;
StringToUper( szUper );
string wordUper = wordOld;
StringToUper( wordUper );

const size_t nDef = wordNew.size() - wordOld.size();
size_t nPos = 0;
int nTimes = 0;
while( string::npos != (nPos = szUper.find( wordUper, nPos)) )
{
szSentence.replace( nPos + nDef * nTimes, wordOld.size(), wordNew );
nPos += wordUper.size();
nTimes++;
}

return szSentence;
}

string& FileWordReplacer::StringToUper( string &szSource ) const
{
string::iterator it = szSource.begin();
while( szSource.end() != it )
{
if( islower( *it ) )
*it = toupper( *it );
it++;
}
return szSource;
}

FileWordReplacer* FileWordReplacer::singleInstance = NULL;

int main()
{
string szFileName;
cout << "输入文件名 : (可以是绝对路径或相对路径)" << endl;
cin >> szFileName;
string wordOld, wordNew;
cout << "输入想要替换的单词 :" << endl;
cin >> wordOld;
cout << "输入新的单词:" << endl;
cin >> wordNew;
bool bDiv;
while( true )
{
cout << "区分大小写? (Y/N)" << endl;
char c;
cin >> c;
if( 'y' == c || 'Y' == c )
{
bDiv = true;
break;
}
else if( 'n' == c || 'N' == c )
{
bDiv = false;
break;
}
}

if ( FileWordReplacer::GetInstance()->FileReplace( szFileName, wordOld, wordNew, bDiv ) )
cout << "
替换成功" << endl;

return 0;
}



c语言的, 这个可以用中文文件名


#include
#include
#include
#include

#define TRUE 1
#define FALSE 0
#define NULL 0
#define EOF (-1)
#define BUFFER_SIZE 4 * 1024 //当文件单行超过1k字节时, 增加该值, 是 4 * 最大行长
typedef int BOOL;
typedef struct tagWORD
{
char szValue[256];
int nLength;
}WORD, *PWORD;
typedef struct tagSENTENCE
{
char *szValue;
int nLength;
}SENTENCE, *PSENTENCE;

// 从用户处获取文件名
void GetFileName( char *szFileName );
// 从用户处获取新旧两句单词(短语)
void GetPairWord( PWORD pWordOld, PWORD pWordNew );
// 从用户处咨询是否区分大小写
BOOL IsDiv();
// 将指定文件中的旧单词替换为新单词, 以bDiv为是否区分大小写的标志
void FileWordReplace( const char *szFileName, PWORD pWordOld, PWORD pWordNew, BOOL bDiv );

int main()
{
char szFileName[64];
WORD wordOld, wordNew;
BOOL bDiv;
//用户输入文件名
GetFileName( szFileName );
//用户输入新旧单词
GetPairWord( &wordOld, &wordNew );
//询问用户是否区分大小写
bDiv = IsDiv();
//替换文件内容
FileWordReplace( szFileName, &wordOld, &wordNew, bDiv );

return 0;
}
//从文件中读取一行句子
int ReadSentence( FILE *pFile, PSENTENCE pSentence )
{
char szFormat[20] = {0};
szFormat[0] = '%';
sprintf( szFormat + 1, "%d[^
]", BUFFER_SIZE / 4 - 1 );

memset( pSentence->szValue, 0, BUFFER_SIZE );
fscanf( pFile, szFormat, pSentence->szValue );
pSentence->nLength = (int)strlen( pSentence->szValue );

return fgetc( pFile ) * !pSentence->nLength;
}
//将一条句子写进文件中
int WriteSentence( FILE *pFile, PSENTENCE pSentence )
{
int nWrited;
nWrited = (int)fwrite( pSentence->szValue, sizeof(char), pSentence->nLength, pFile );
fputc( '
', pFile );
return nWrited + 1;
}
//判断一个字母是否是小写
BOOL IsLower( char c )
{
return c >= 'a' && c <= 'z' ;
}
//将一个字符转化为大写
char ToUper( char c )
{
return c - 'a' + 'A';
}
//用一条一般句子生成一条不含小写字母的句子
char* MakeUper( const char *szSource, const int nLength )
{
char *szTemp = (char*)malloc( sizeof(char) * BUFFER_SIZE );
int i;
for( i=0; i<nLength; i++)
szTemp[i] = IsLower( szSource[i] ) ? ToUper( szSource[i] ) : szSource[i];
szTemp[i] = 0;
return szTemp;
}
//将句子中的单词(短语)替换成新单词, 区分大小写
int StringWordReplace( PSENTENCE pSentence, PWORD pWordOld, PWORD pWordNew )
{
char *szTemp = (char*)malloc( sizeof(char) * BUFFER_SIZE );
int nPos = 0, nTimes = 0;
const int nDif = pWordNew->nLength - pWordOld->nLength;

while( nPos nLength - pWordOld->nLength )
{
if( !strncmp( pSentence->szValue + nPos, pWordOld->szValue, pWordOld->nLength ) )
{
strcpy( szTemp + nPos + nTimes * nDif, pWordNew->szValue );
nPos += pWordOld->nLength;
nTimes++;
}
else
{
szTemp[nPos + nTimes * nDif] = pSentence->szValue[nPos];
nPos++;
}
}
strcpy( szTemp + nPos + nTimes * nDif, pSentence->szValue + nPos );

pSentence->nLength += nDif * nTimes;
free( pSentence->szValue );
pSentence->szValue = szTemp;

return nTimes;
}
//将句子中的单词(短语)替换成新单词, 不区分大小写
int StringWordReplaceEx( PSENTENCE pSentence, PWORD pWordOld, PWORD pWordNew )
{
char *szTemp = (char*)malloc( sizeof(char) * BUFFER_SIZE );
char *szUperSentence = MakeUper( pSentence->szValue, pSentence->nLength );
char *szUperWord = MakeUper( pWordOld->szValue, pWordOld->nLength );
int nPos = 0, nTimes = 0;
const int nDif = pWordNew->nLength - pWordOld->nLength;

while( nPos nLength - pWordOld->nLength )
{
if( !strncmp( szUperSentence + nPos, szUperWord, pWordOld->nLength ) )
{
strcpy( szTemp + nPos + nTimes * nDif, pWordNew->szValue );
nPos += pWordOld->nLength;
nTimes++;
}
else
{
szTemp[nPos + nTimes * nDif] = pSentence->szValue[nPos];
nPos++;
}
}
strcpy( szTemp + nPos + nTimes * nDif, pSentence->szValue + nPos );

free( szUperSentence );
free( szUperWord );
pSentence->nLength += nDif * nTimes;
free( pSentence->szValue );
pSentence->szValue = szTemp;

return nTimes;
}
//从用户那里获取一个单词
void GetWord( PWORD pWord )
{
memset( pWord->szValue, 0, 256 );

puts("输入单词(可以是中间有空格的短语), 但不能超过255个字符");
scanf("%255[^
]", pWord->szValue );
fflush( stdin );

pWord->nLength = strlen( pWord->szValue );
}
//将旧文件删除, 将新文件改成旧文件的名字
//因为文件中单词替换后文件长度可能改变, 所以只能生成新文件再删除旧的
void DelAndReNameFile( const char *szFileName, const char *szTempFileName )
{
char szCmd[128] = {0};
const char *pCTemp;

strcpy( szCmd, "del ");
strcpy( szCmd + 4, szFileName );
system( szCmd );
memset( szCmd, 0, 128 );
strcpy( szCmd, "ren ");
strcpy( szCmd + 4, szTempFileName );
szCmd[strlen(szCmd)] = ' ';
pCTemp = strrchr( szFileName, '\\' );
strcpy( szCmd + strlen(szCmd), pCTemp ? (pCTemp + 1) : szFileName );
system( szCmd );
}
//在旧文件相同的路径下给新文件取名, 文件名是某单词的md5码
void GetTempFileName( const char *szFileName, char *szTempFileName )
{
const char *pCTemp;
pCTemp = strrchr( szFileName, '\\' );
if( pCTemp )
strncpy( szTempFileName, szFileName, pCTemp - szFileName + 1 );
strcpy( szTempFileName + strlen(szTempFileName), "22EFDBE132EABC102306BD7A334FB434" );
}
//以下几个函数的说明在声明处
void FileWordReplace( const char *szFileName, PWORD pWordOld, PWORD pWordNew, BOOL bDiv )
{
FILE *pFileS, *pFileD;
char szTempFileName[128] = {0};
SENTENCE sentence;

GetTempFileName( szFileName, szTempFileName );
sentence.szValue = (char*)malloc( sizeof(char) * BUFFER_SIZE );
pFileS = fopen( szFileName, "r" );
pFileD = fopen( szTempFileName, "w" );

while( EOF != ReadSentence( pFileS, &sentence ) )
{
if( bDiv )
StringWordReplace( &sentence, pWordOld, pWordNew );
else
StringWordReplaceEx( &sentence, pWordOld, pWordNew );
WriteSentence( pFileD, &sentence );
}

fclose( pFileS );
fclose( pFileD );
free( sentence.szValue );
DelAndReNameFile( szFileName, szTempFileName );
}

void GetPairWord( PWORD pWordOld, PWORD pWordNew )
{
puts("输入要替换的单词 : ");
GetWord( pWordOld );
puts("输入新的单词 : ");
GetWord( pWordNew );
}

BOOL IsDiv()
{
char cInput;

while( TRUE )
{
puts("区分大小写吗? (Y/N)");
cInput = getchar();
if( 'y' == cInput || 'Y' == cInput )
return TRUE;
else if( 'n' == cInput || 'N' == cInput )
return FALSE;
}
}

void GetFileName( char *szFileName )
{
FILE *pFile;
szFileName[63] = 0;

while( TRUE )
{
puts("输入文件名");
if ( 1 == scanf( "%63s", szFileName ) )
{
fflush( stdin );
if( pFile = fopen( szFileName, "r" ) )
{
fclose( pFile );
break;
}
else
puts("找不到文件");
}
}
}


最后一种方法, 去除了校验等...

#include
#include
// 缓冲区, 用来放读取的内容
#define BUFFER_SIZE 1024
// 部分大小写的字符串比较
int MyCmp( const char *sz1, const char *sz2, int nLen )
{
char cMax, cMin;
for( ;nLen--; sz1++, sz2++ )
{
if( *sz1 == *sz2 )
continue;
cMax = *sz1 >= *sz2 ? *sz1 : *sz2;
cMin = *sz1 + *sz2 - cMax;
if( (cMax = 'a') && (32 == cMax - cMin) )
continue;
return *sz1 - *sz2;
}
return 0;
}

int main()
{
// 文件指针
FILE *pFileS, *pFileD;
// 输入缓冲; 要替换的单词; 新的单词
char buffer[BUFFER_SIZE], wordOld[64] = {0}, wordNew[64] = {0};
// 缓冲区实际大小; 缓冲区操作标志; 每次读取的字节数; 要替换的单词长度; 新单词的长度; 区分大小写标志
int nTop = 0, nPoint, nRead, nOldLen, nNewLen, bDiv;

puts("输入两个词");
scanf("%63s%63s", wordOld, wordNew);
nOldLen = strlen(wordOld), nNewLen = strlen(wordNew);
puts("是否区分大小写? 输入1(Yes),0(No)");
scanf("%d", &bDiv);

pFileS = fopen("a.txt", "rb");
pFileD = fopen("aa.txt", "wb");

while( nRead = fread( buffer + nTop, sizeof(char), BUFFER_SIZE - nTop, pFileS) )
{
nTop += nRead;
// 处理旧单词整数倍的那部分缓冲
for( nPoint=0; nPoint<=nTop - nOldLen; )
{
// 如果要区分则用memcmp比较, 不区分用自定义比较函数比较
if( !( bDiv ? memcmp( buffer + nPoint, wordOld, nOldLen) : MyCmp( buffer + nPoint, wordOld, nOldLen )) )
{
// 相等, 写进文件
fwrite( wordNew, sizeof(char), nNewLen, pFileD );
// 缓冲区标志(相当于指针)移位
nPoint += nOldLen;
}
else
// 不相等, 将该字节写入并移动1字节
fputc( buffer[nPoint++], pFileD );
}
// 处理剩下的缓冲区; 方法同上
if( !( bDiv ? memcmp( buffer + nPoint, wordOld, nTop - nPoint ) : MyCmp( buffer + nPoint, wordOld, nTop - nPoint)) )
{
memcpy( buffer, buffer + nPoint, nTop - nPoint );
nTop = nTop - nPoint;
}
else
{
fwrite( buffer + nPoint, sizeof(char), nTop - nPoint, pFileD );
nTop = 0;
}
}
// 关闭文件
puts("转化成功");
fclose( pFileS ), fclose( pFileD );

return 0;
}

1. 以下叙述中正确的是( D)
D) 所有被调用的函数一定要在调用之前进行定义
2. C++语言的跳转语句中,对于break和continue说法正确的是(B)
B)continue语句只应用与循环体中  
3. for(int x=0,y=0; !x& &y<=5; y++)语句执行循环的次数是(C)
C)6
4. 假定AA为一个类,a()为该类公有的函数成员,x为该类的一个对象,则访问x对象中函数成员a()的格式为(B)。
B) x.a()
5. 下面有关重载函数的说法中正确的是(C) 
C)重载函数必须有不同的形参列表  
6. 下列关于构造函数的描述中,错误的是(D)
   D)构造函数不可以重载
7. 设有数组定义:char array[]=″China″;,则数组array所占的空间为( C )
C)6个字节
8. 下面选项中不属于面向对象程序设计特征的是(D) 。
D)相似性
9. 在C++中用来实现运行时多态性的是( D)。
D)虚函数
10. 以下程序的输出结果是(A)
#include <iostream>
using namespace std;
void reverse(int a[],int n)
{
int i,t;
for(i=0;i<n/2; i++)
{ t=a[i]; a[i]=a[n-1-i];a[n-1-i]=t;
}
}
void main()
{
int b[10]={1,2,3,4,5,6,7,8,9,10};int i,s=0;
reverse(b,8);
for(i=6;i<10;i++)s+=b[i];
cout<<s;
}  
A) 22
11. 下面叙述不正确的是(D)
D)基类的公有成员在派生类中仍然是公有
13. 下面描述中,表达错误的是(D) 
D) 私有继承时基类中的public成员在派生类中是private的
14. 有以下程序
  #include<iostream>
using namespace std;
void main( )
{
int a=5,b=0,c=0;
if(a=b+c) cout<<"***"<<endl;
else cout<<"$$$"<<endl;
}
下列选项叙述正确的是(D)
D) 输出$$$
15. 假定AB为一个类,则执行 “AB x;”语句时将自动调用该类的(B)。
B) 无参构造函数

1, B
A 基本单位是语句。
C main 可以在任意位置
D 被调函数在被调前一定要声明,未必要定义

2,B
break ,continue 都能用于循环. break 还可用于switch语句

3,C

4,B

5,C
函数重载是根据参数类型或者是参数个数来的。

6,D

7, C
array的实际内容要包含一个'\0'

8, D

9, D

10, A

11, D

13, D

14, D

15, B

1, B
A 基本单位是语句。
B正确
C main 可以在任意位置
D 被调函数在被调前一定要声明,未必要定义

2,B
break ,continue 都能用于循环. break 还可用于switch语句

3,C

4,B

5,C
函数重载是根据参数类型或者是参数个数来的。

6,D

7, C
array的实际内容要包含一个'\0'
8, D
9, D
10, A
11, D
13, D
14, D
15, B

1-5:ACCAB
6-10:BCDDA
11-15:DDDDB

o(︶︿︶)o 唉,现在的孩子真懒了~~

在前面加上

#include<windows.h>
#include<Ntsecapi.h>

typedef enum _MEMORY_INFORMATION_CLASS {
MemoryBasicInformation,
MemoryWorkingSetList,
MemorySectionName,
MemoryBasicVlmInformation
} MEMORY_INFORMATION_CLASS;

typedef ULONG (*PF_ZwQueryVirtualMemory) (
HANDLE ProcessHandle,
PVOID BaseAddress,
MEMORY_INFORMATION_CLASS MemoryInformationClass,
PVOID MemoryInformation,
ULONG MemoryInformationLength,
PULONG ReturnLength OPTIONAL
);



单片机常用的14个C语言算法,看过的都成了大神!
1. 简单计数与求和这类问题通常通过循环处理,比如统计100个[0,99]随机整数中个位数字的分布,使用数组存储结果。2. 求最大公约数与最小公倍数通过欧几里得算法,通过不断除以余数的方式求解,如求14和6的最大公约数。3. 判断素数利用除法和条件判断,检查一个数是否只被1和自身整除,如检测14是否为...

求C++大神。14个选择题,100分,谢谢啊!急!
3.for(int x=0,y=0; !x& &y<=5; y++)语句执行循环的次数是(C)C)6 4.假定AA为一个类,a()为该类公有的函数成员,x为该类的一个对象,则访问x对象中函数成员a()的格式为(B)。B) x.a()5.下面有关重载函数的说法中正确的是(C)C)重载函数必须有不同的形参列表 6.下列关...

求c语言大神11--14都是
11.正常情况下0开头的是八进制,0X开头是十六进制,转义字符中\\之后默认是八进制,且省略标识符0不写的,所以对'\\101',先翻译1*1+0*8+1*64=65对应ASCII码的'A'12.A输出空格符号标记,和'\\ '就是第二个\\换成空格的效果一样 B错误在转义字符默认是八进制的,不能出现数字8 C错误,不存在...

求c语言大神解题及解释。图片14题,4题,图片678910题以及二1中最后一个...
14题,是考逻辑运算的,ab比较的结果为0,0再和c比较结果还是0,所以执行--b得到正确结果。

14题,c语言大神求助啊
所以 x = 1, y = 0;z在逻辑运算||算完之后自增,变为2故最后结果为 k = 1,x = 1,y = 0, z = 2 *\/ 为了保证答案的正确性,我进行了编码测试。代码如下: #include <cstdio>int main(){ int x = 0, y = 0, z = 1; int k = x++ && y++ || z++; p...

求C语言大神回答:int x=14,则表达式 x++%-5的值是?
x++是后缀运算,所以先取x的值14,14%-5的商是-2,余数是4,因而表达式的最终结果是4

求一个C语言大神
include <stdio.h>void main(){int i=0,j,n,a[5];scanf("%d",&n);while(n){a[i]=n%10;n\/=10;i++;}printf("%d\\n",i);for(j=i-1;j>0;j--)printf("%d ",a[j]);printf("%d\\n",a[0]);for(j=0;j

求C语言大神char str[14]={"I am"};strcat(str,"sad!")
http:\/\/zhidao.baidu.com\/link?url=beQM6ZGxcyUBKns4C22wBa-rXJi5Vpq_5n2Aisu5fAydEAo3mNru1gZcpJH69809VTNGKujQX_DoiUNxTQVHR_

来个高中物理大神告诉我14题C选项怎么算
a1=(3-0)\/2=1.5m\/s^2 前二秒内动力设为F F+f=m*a1 F=1.5+1.5=3N 10秒后到14秒前,小车做匀速直线运动,处于受力平衡状态,动力等于阻力,这段时间内小车位移设为S2。额定功率P=|f|*s2\/4=1.5*24\/4=9瓦 达到额定功率(即2秒末)后,10秒前,阻力不变,动力在减小,这段时间...

求C语言大神。输入10个字符,判断有多少个英文字符,多少个数字字符,多 ...
参考代码:include<stdio.h>int main(){ char c; int letter=0,number=0,other=0,i; for(i=0;i<10;i++) { c=getchar(); if(c>='a'&&c<='z'||c>='A'&&c<='Z') letter++; else if(c>='0'&&c<='9') number++; else other++; } ...

凯里市13317706651: 求C++大神.14个选择题,100分,谢谢啊!急! -
泷申利喜: 1. 以下叙述中正确的是( D) D) 所有被调用的函数一定要在调用之前进行定义2. C++语言的跳转语句中,对于break和continue说法正确的是(B) B)continue语句只应用与循环体中3. for(int x=0,y=0; !x& &y<=5; y++)语句执行循环的次数...

凯里市13317706651: C++选择题 -
泷申利喜: 一.选择题:1.说明函数int method a (floct)是友元函数应为(A): A)friend int method a a (floctz) B): friend int method a (floctz) C): int friend a (floctz) friend D): int method a friend (floctz) 2.对于下面的几个函数: Void f(int x) (…) 1/1 int f(int y) (…)1/2 ...

凯里市13317706651: 求C++编程大神从键盘输入两个两位数a、b,将其组合成一个四位数输出(千位是a的个位,百位是b的十位,十位是b的个位,个位是a的十位) -
泷申利喜:[答案] 不想敲代码了,主要的给你说一下. a的个位是 a % 10 a的十位是 a / 10 因为b的十位占用了输出的数的百位,个位占用了输出的数的十位,所以b * 10就可以满足要求了. 所以最后输出的数 Ans = a % 10 * 1000 + b * 10 + a / 10;代码里核心就是这一句...

凯里市13317706651: 求c++大神帮忙! -
泷申利喜: 1)C 2)D 3) A 4)D 5)A 6)C 7)C 8)B 9)C 10)D 1)继承 多态2)cpp3) private4)抽象类说明:10)题中不能选 C ,因为 s 是常量指针,不能再被赋值.6)选C其实也不严谨,只要函数被书写在...

凯里市13317706651: C++选择题
泷申利喜: 1、下列常数中哪个是合法的?(C ) 【A】3abc 【B】class 【C】_sum 【D】fun(4) 2、字符'a'的ASCII码是97,则表达式sizeof('a'+'b')的值是(B ). 【A】1 【B】2 【C】97 【D】195 3、下列程序段的循环次数是(B ). int i=10; ...

凯里市13317706651: 悬赏50分求高手帮我看一下这5个C++选择题,给出标准(100%正确)答案,不肯定就不要写上去了啊哈
泷申利喜:楼主 其中21. 23 .24三个题,我在VC6.0中运行过.正确的. 21 21.C 22.B 23.A 24.B 25.C

凯里市13317706651: 关于C++的选择题 -
泷申利喜: C,系统生成的拷贝构造函数会按位copy,而不是什么都不做

凯里市13317706651: C++选择题 求高手解答 -
泷申利喜: 1、③2、①3、③4、 ② 消除二义性5、① 6、③7、48、39、310、B

凯里市13317706651: 问10个C++的选择题,高手来回答一下
泷申利喜: 1、(B)继承 2、(B)传递性 3、(A)完全相同 4、(C)公有继承的保护成员 5、(B)解决二义性的最常用的方法是对成员名的限定法 6、(B)消除二义性 7、(D)派生类的虚函数与基类的虚函数具有不同的参数个数和类型 8、(D)抽象类只能作为基类来使用,其纯虚函数的实现由派生类给出 9、(C)纯虚函数 (D)静态成员函数 10、A)抽象类9、(C)纯虚函数

凯里市13317706651: 几道简单的C++题目,急求答案 -
泷申利喜: 正确率90%吧 BCBCB CDDCB11. (grade>80)&&(grade12. 1,513. 注释部分、编译预处理部分、程序正文部分14. 子函数声明15. 016. 顺序结构、分支结构、循环结构17. gets、getline18. 指针变量19. switch

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网