S
soup_or_power
Sorry these are not c++ questions per se. Your help is appreciated.
Suppose arr is an array (e.g. int arr[100]) Here are some questions:
a)What does arr point to?
My answer: to the first element of the array i.e. arr[0]
b) What if we do a++ or --a?
a++ will not point to a[1]
--a will cause segmentation fault
c) Similarly if there is a pointer to arr (e.g. int * ptr=arr) what
does ptr++ do?
Don't know
Suppose arr is an array (e.g. int arr[100]) Here are some questions:
a)What does arr point to?
My answer: to the first element of the array i.e. arr[0]
b) What if we do a++ or --a?
a++ will not point to a[1]
--a will cause segmentation fault
c) Similarly if there is a pointer to arr (e.g. int * ptr=arr) what
does ptr++ do?
Don't know