diff --git a/cpp/pointers/pointers.md b/cpp/pointers/pointers.md index 00ed6c6..0bd8434 100644 --- a/cpp/pointers/pointers.md +++ b/cpp/pointers/pointers.md @@ -93,8 +93,32 @@ int main() return 0; } ``` + ### Check result [here](https://onecompiler.com/cpp/3yjazmygf) +## Example +```c +#include +using namespace std; + +int main(){ + char b[]= "abc"; + + //in char array ptr, ptr does not store the address(unlike integer array) + //but instead prints the whole characters untill it find '\0' + + char *p = & b[0]; //prints abc + cout<