- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- char n1[5]="vito";
- char n2[4]={'v','i','t','o'};
- string n3[2]={"vi","to"};
- string n4="vito";
- int a=3;
- char c='P';
- cout<<n1<<endl;
- for(int i=0; i<4; i++)
- cout<<n2[i];
- cout<<endl;
- for(int i=0; i<2; i++)
- cout<<n3[i];
- cout<<endl;
- cout<<n4<<endl;
- cout<<a<<endl;
- cout<<c<<endl;
- system("pause");
- return 0;
- }
複製代碼 |