Level up your skills by byte size resources
Path intended to achieve your particular goal.
Find dozens of free cheatsheets for quick reference.
Find the Archive of our bootcamps and quick tutorial videos.
Indepth Information about a certain topics.
A string is basically an array of characters. In C++ anything written within a double quotes is a string.
Consider the first hello world program
char greeting[13] = "hello world";
char greeting[] = "what";// YOU NEED NOT PLACE THE '\0' CHARACTER
"\0" is used automatically added at the end of a string.
#include using namespace std; int main () { char greeting[5] = "hello nice to meet you"; cout << "Question: "; cout << greeting << endl; return 0; }
Output: Question: hello nice to meet you