函数p()string()的原型为void p()string(int,char),其功能是连续输出n个相同的字符。若要输出20个#字符,正确的函数调用是:

2024-01-12

函数p()string()的原型为void p()string(int,char),其功能是连续输出n个相同的字符。若要输出20个#字符,正确的函数调用是:

A.p()string(20,';#';)

B.p()string(';#';,20)

C.p()string(#,20)

D.p()string(20,#)



参考答案:

p()string(20,';#';)