Search:

Type: Posts; User: UCnLA

Search: Search took 0.01 seconds; generated 36 minute(s) ago.

  1. Replies
    23
    Views
    16,066

    A)I implemented your suggestion, but I also get...

    A)I implemented your suggestion, but I also get strings less than length of original string. How can I eliminate these? I thought the following would work, but I still get the dimminished strings....
  2. Replies
    23
    Views
    16,066

    The Champ returns.

    Thanks. I used all your suggestions and the output is cleaner, but still includes partial words, single letters and words larger than string length. How can I clean this up. Also the change you...
  3. Replies
    23
    Views
    16,066

    Source Code: String Permutations

    /*
    ** PERMUTE.C - prints all permutations of an input string
    **
    ** adapted from public domain demo by Jon Guthrie for J. Uslander (4/1/2008).
    **
    */

    #include <string.h>
    #include ...
  4. Replies
    23
    Views
    16,066

    Runtime Error

    Actually it was missing the final bracket from main(). It compiles ok now, but there is a runtime error. It asks the user for an input string, but also prints the error message as follows:

    ...
  5. Replies
    23
    Views
    16,066

    and line 81.... 78 int charcmp(char *a, char...

    and line 81....

    78 int charcmp(char *a, char *b)
    79 {
    80 return(*a - *b);
    81 }
  6. Replies
    23
    Views
    16,066

    compiler error messages

    What follows is the error message after compiling using mingw code::blocks.
    Everything looks in order but this.
    Thanks for your help.
    UC


    C:\Users\UC\Downloads\New2C\permute2[1].c||In function...
  7. Replies
    23
    Views
    16,066

    Thanks for everyone's help here. 1)I allocated...

    Thanks for everyone's help here.
    1)I allocated memory as suggested (yet I was learned on FAQ that malloc is the prefered method to use), and 2) I am now left with an compiler error regarding the...
  8. Replies
    23
    Views
    16,066

    Problem allocating memory for string.

    I followed your advice, but I still have problems compiling.
    Can I use strlen(string) as the length argument parameter for fgets??
    What else might be the problem here.
    thanks. UC


    #include...
  9. Replies
    23
    Views
    16,066

    Beginners C Programming Challenge

    I've been working on the 2nd Beginners (Help-Free)Programming Challenge of this very same site, and could use some help completing. I have adapted a snippet (by jon guthrie) for a program to...
  10. Replies
    1
    Views
    2,058

    main() ; argv[1] = string at argv[0]???

    I have been reading thru the FAQ and looking at snippets and source code, but am somewhat confused how main() works. It seems that in several places that this function somehow contains the name of a...
  11. Replies
    5
    Views
    4,440

    Best Approach for Learning

    Kudos to who(m)ever wrote the FAQ.
    I am learning so much going thru these pages!!
    My question is regarding what is the best learning approach.
    Am I learning well enough by reading and learning...
  12. Replies
    2
    Views
    3,919

    Beginners C Programming Challenge

    Code is as follows:



    #include <stdlib.h> /* Program to count the total # of lines in a file and print result */
    #include <stdio.h>

    int line_count=0; /* variable for total lines in a...
Results 1 to 12 of 12