Pointers | Sololearn: Learn to code for FREE!

0

Pointers

Why this works char* arr[3] = {a, b, c} ; But not int* arr[5] = {1,2,3,4,5};

c++ c

9/11/2020 11:06:52 AM

shrijith

1 Answer

New Answer

+4

Pointers store addresses, not values. Your first example wouldn't work either if you didn't have variable <a>, <b> and <c>.