Christopher Flores
  • Member for 4 years, 3 months
  • Last seen more than 2 years ago
  • Toowoomba City, Queensland, Australia
Why does the if else conditional give me a segmentation fault
3 votes

First issue is that you blindly get argv[1] before actually checking the number of arguments. The segfault, however, comes from the fact you are passing a string to isalpha, whose argument is actually ...

View answer
Problem with greedy problem
2 votes

Before the answer, a few housekeeping things: Don't post huge chucks of your solution to any pset on the internet (a few lines may be ok - just kind in mind reasonable vs. unreasonable behaviour). ...

View answer
PSET 2 - Can Crack be implemented for 5 characters in a more efficient way?
1 votes

I'm not sure if this is faster, but it is an alternative to nesting loops: #include <stdio.h> #define FIRST_CHAR 'a' #define LAST_CHAR 'f' #define MAX_LENGTH 4 // This just makes the type ...

View answer
Character array values return 4 bytes instead of 1
1 votes

Essentially the problem comes from the implicit casting from char (which remember is just an 8-bit signed integer) to an unsigned hexadecimal integer (32-bits). This programme shows the problem: #...

View answer
MARIO!! just look over
0 votes

Before the answer, a few housekeeping things: Don't post huge chucks of your solution to any pset on the internet (a few lines may be ok - just kind in mind reasonable vs. unreasonable behaviour). ...

View answer