I want to know that can an signed integer accept higher value than its maximum value either negative or positive.In pset3 I am giving significantly large value as an argument to argv, that's okay it is a string it can accept any length of string but can 32 bit integer like needle & haystack[i] store that value & produce the output.
int variable, whether it's signed or unsigned, cannot store values that are out-of-range and trying to assign a value that is out-of-range to an
int variable would typically result in a warning unless you have an option like
-Werror passed in your compilation command in which case it would result in an error.
Assigning an out-of-range value to an
int variable causes the value to wrap around. For example, if the minimum value that an int could store was -10 and the maximum value that it could store was 9 and you tried to store a value like 13 in it, it would become -7 (this also applies for trying to store a value that is lower the minimum limit). This is resulted in from the fact that an int has a fixed size. If an int was 4 bits long and the value was 6 bits for example, typically the left-most two bits of the value would be ignored.
And a string still cannot accept a value of any length. You are still limited by the amount of available memory on your computer as well as the size of your string (which is not specified by you in case the strings in
argv are involved).