- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- char f[4]="Ian";
- char f2[3]={'I','a','n'};
- string f3[2]={"Ia","n"};
- string f4="Ian";
- int a=3;
- char c='X';
- cout<<f<<endl;
- for(int i=0;i<4;i++)
- cout<<f2[i];
- cout<<endl;
- for(int i=0;i<2;i++)
- cout<<f3[i];
- cout<<endl;
-
- cout<<f4<<endl;
- cout<<a<<endl;
- cout<<c<<endl;
-
- system("pause");
- return 0;
- }
複製代碼 |