15 Reputation Points
Ranked #2K
- Strength to Increase Rep
- +2
- Strength to Decrease Rep
- -0
100% Quality Score
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: class Sample { int num; void method() { num = 1; // Sample.num is set to 1 int num = num = 2; // num in method is set to 2, the second num is num in method num = 3; // num in method is set to 3 } … | |
Re: Is this the whole code? k and i are not defined and initialized. Do you want to compare all read strings with the actual one? | |
Re: try for(i=c+1;i<=e;i++) { a[i]=b[i-c]; } instead of for(i=c+1;i<=e;i++) { for(j=1;j<=d;j++) { a[i]=b[j]; // this sets a[i]=b[d] because all settings a[i]=b[j] with j<d are overwritten by next j } } Please be aware that in C arrays are zero based i.e. array a begins with a[0] until a[9] with your declaration. … |