Skip to content

Instantly share code, notes, and snippets.

@limzunyuan
Created February 25, 2017 13:08
Show Gist options
  • Save limzunyuan/66036fc6a86f7bd7fd70a3f2317e4deb to your computer and use it in GitHub Desktop.
Save limzunyuan/66036fc6a86f7bd7fd70a3f2317e4deb to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
char str[] = "FuYong-Zun";
str[8]='\0';
cout<<str<<endl;
string str1 = "FuYong-Zun";
str1[8]= '\0';
cout<<str1<<endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment