COP-3014 Lecture Notes - Lecture 2: Null Pointer, C Data Types, English Alphabet
Document Summary
Input string cannot be any larger than 19 because of the need for the terminaion character (\0) #include s2. #include using namespace std; int main(void) string s1, s2, s3, s4; s1 = david ; s2 = alan ; s3 = gaitros ; s4 = s1 + s2 + s3; cout << s4 << endl; return 0; In order to iniialize: string s1( david ), string s1 = david , s1 = david ; February 15, 2016 pointers and dynamic memory allocaion. Int *yptr; yptr = &y; cout << *yptr << endl: * indicates that it will be followed by a pointer name (null pointer, &y returns the locaion of y iii. In the above funcion, y and *yptr refers to the same 5; when one changes, the other one also changes: example: