The broader program is a program that can decipher scrambled words from a dictionary file.
If the word DDA were put in, the Word ADD would be "found" twice...not a big deal...I am more curious...
Type: Posts; User: wd_kendrick
The broader program is a program that can decipher scrambled words from a dictionary file.
If the word DDA were put in, the Word ADD would be "found" twice...not a big deal...I am more curious...
Thanks for the reply...I gave it a try, but there are still situations that doubles will print:
example:
word: DAD
A will swap with both D's yielding the same word.
Anyone have an idea?
I have the code to produce all permutations of a character string.
the code is as follows:
void RecursivePermute(char str[], int k) {
int j;
// Base-case: Since all...
I have made the changes recommended above...Most of the function prototypes were provided by the instructor, and we had to implement them using his defined pre and post conditions. Some of the code...
Is there a way to free "p" ?
say would
free(s1->p);
Typical academia type stuff, do something the hard way just to make you learn something :)
You are right about the scanf, I was just reading someone elses post about that....thanks for pointing that out.
In the assignment we are to create a the type "integer" that is meant to handle...
I am not sure if this is your problem, but in the code you provided, you are missing the closing brace for your first if statement. Since you are only using one line after both your if and else, the...
I am finished with my first assignment in a C prog 2 class. I am going to post it here and hopefully get some constructive criticism. This program is nothing really to shout about...adds and...
Wow...I fell like a dummy.
int_array=realloc(int_array,size1*sizeof(int));
works perfectly.
...Also, thanks for the error checking hints...always a good idea
Here is a snippet of code that displays the problem I am having with realloc in a much larger program:
#include <stdlib.h>
#include <stdio.h>
int main()
{