0

Can you assign a pointer to array?

22nd Nov 2016, 4:25 PM
Chiren Shah
Chiren Shah - avatar
4 Respostas
+ 1
how
22nd Nov 2016, 5:06 PM
Chiren Shah
Chiren Shah - avatar
+ 1
e.g. int a[10]; int *x=a; then just access all elements by their displacement if u want the 2nd value of the array then cout<<*(a+2);
22nd Nov 2016, 5:10 PM
Vikrant Banwal
Vikrant Banwal - avatar
0
yes ofcourse
22nd Nov 2016, 5:04 PM
Vikrant Banwal
Vikrant Banwal - avatar
0
similar to the strings
22nd Nov 2016, 5:08 PM
Vikrant Banwal
Vikrant Banwal - avatar