|||
a='Good'; b='Morning';
firstnames=('Maira';'John');
lastnames=('Green';'Smith');
Syntax: c1=strcat(a,b);
names1=strcat(n1,n2);
Output: c1->
'GoodMorning'
names1->
'MariaGreen'
'JohnSmith'
Syntax: c2=strcat(a,{' '},b); % there is a backspace inside {' '}.
names2=strcat(n1,{', '},n2); % there are one comma and one backspace inside {' '}.
Output: c2->
'Good Morning'
names2->
'Maria, Green'
'John, Smith'
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-10 11:23
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社