1 vote
Accepted

PSet 2 - Why will it still pass negative numbers?

There are a few problems here. First, it's checking whether a string, argv[1], is greater than 0, which will always be true, no matter what the number that results after the atoi() call may be. All ...
  • 65.5k
1 vote
Accepted

pset2 Initials - negative index

Have you tried? if (i == 0 || name[i] == 32) { printf("%c", toupper(name[i + 1])); } In the most comfortable edition we assume that the user enters the name correctly and that the space is not ...
  • 5,191

Only top scored, non community-wiki answers of a minimum length are eligible