4. Characters and Pointers #

Created Monday 23 December 2019

Character arrays and pointers have a different behavior, as compared to numerical data types.

Note: This is okay. But initializing a char* with a string may or may not work. As the literal is stored in the temporary memory which may or may not be readable after taking the input. So, the safe method is to not initialize the pointer directly using *string literal. *Note that such a declarization is available only for strings and not for any other data type. e.g int x = 2 is invalid, while char x =“sanjar” will generate warnings but unsafe.

Note: