Search:

Type: Posts; User: paranoidgnu

Page 1 of 2 1 2

Search: Search took 0.03 seconds.

  1. My function(copy_list) doesn't work.I can't...

    My function(copy_list) doesn't work.I can't figure out where is the problem.
  2. Copying a linked list into another linked list

    Hi,
    I want to write a copy_list function that creates a linked list(the function result) with new nodes that contain the same data as the linked list referenced by the single argument of copy_list...
  3. Replies
    1
    Views
    1,785

    Creating a Binary Search Tree

    Hi,
    I want to create and display a binary search tree of integer keys.
    But, I have problem with my inorder function.I simply want to display the resulting ordered list after each insertion by...
  4. Replies
    1
    Views
    2,311

    modf function doesn't work properly

    I'm trying to store all digits of a decimal number.I have decided to use modf for this purpose.My code segment is;

    struct high_precision scan_high(int *j)
    {
    int i,a;
    struct...
  5. I have edited code,It works,but in some cases it...

    I have edited code,It works,but in some cases it gives segmentation fault.

    #include <stdio.h>
    #include <string.h>
    void LongestCommonSubstring(const char *str1_in, const char *str2_in, char...
  6. longest common substrings ( I can't implement algoritm)

    Hi, again a question from the book.
    Question wants to find longest common prefix of two words
    (e.g. global and glossary and longest common prefix of them glo)
    I found an algorithm from wikipedia,...
  7. Yes, but is it a bit complicated(Talking about...

    Yes, but is it a bit complicated(Talking about your code)
    For example I have to print output like this

    printf("%d words, one letter = %d, two letter = %d, three letter = %d,\
    four letter = %d,...
  8. Now, it doesn't give error.But, I am not sure......

    Now, it doesn't give error.But, I am not sure... Is that all?

    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    int main(void)
    {
    char ch, string[100][100];
    int i = 0,j, words = 0,...
  9. @Salem , I want to create two dimensional...

    @Salem ,
    I want to create two dimensional array.How can I fix this error.
    and bt gives
  10. @Salem, Latest code, nearly same as previous. ...

    @Salem,
    Latest code, nearly same as previous.

    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    int main(void)
    {
    char ch, *string[100];
    int i = 0,j, words = 0, one_word = 0,...
  11. Thanks for your advices CommonTater.I will be...

    Thanks for your advices CommonTater.I will be more rigorous and careful.Anyway I have to be what you have said.You are right.

    Now, gdb says;


    I changed file name.But nothing changed..
  12. @Commontater You are right I have to be more...

    @Commontater
    You are right I have to be more rigorous, but it's just a question from a book.And I'm a beginner
  13. text.dat is in same directory.But somehow it...

    text.dat is in same directory.But somehow it can't be read.
    And also I added this to my code.

    if(inp == NULL)
    {
    printf("text.dat cannot be opened");
    return 1;

    and it says just like you...
  14. Segmentation fault( counts number of words program )

    Hi,
    I solved question but somehow it gives Segmentation fault...

    #include <stdio.h>
    #include <string.h>
    #include <ctype.h>
    int main(void)
    {
    char ch, *string[10];
    int i = 0,j, words = 0,...
  15. Replies
    3
    Views
    3,706

    How to count lines with isspace

    Hi,This time Almost, I solved question.But I have problem with counting lines.I can't figure out how to count lines with isspace.
    the code is

    #include <stdio.h>
    #include <string.h>
    #include...
  16. Replies
    12
    Views
    5,137

    not working: working:

    not working:

    working:
  17. Replies
    12
    Views
    5,137

    I have edited the code.It works well, but...

    I have edited the code.It works well, but sometimes makes wrong sort.Compiler didn't give errors.But, I am not sure about code.

    #include <stdio.h>
    #include <string.h>
    int get_min_range(const...
  18. Replies
    12
    Views
    5,137

    Name of the book is Problem Solving and Program...

    Name of the book is Problem Solving and Program Design in C.
    What will you suggest.Will I start coding from beginning or can it be corrected.
  19. Replies
    12
    Views
    5,137

    It is described in an example(in book).Book gives...

    It is described in an example(in book).Book gives a comparison(numeric to string) and says write the string selection sort function described in example.
    I mean strcmp and strcpy from book's...
  20. Replies
    12
    Views
    5,137

    I installed Nemiver...

    I installed Nemiver.When it calls select_sort funtion, it gives "Target received a signal: SIGSEGV, Segmentation fault"
    And also compiler gives
  21. Replies
    12
    Views
    5,137

    String selection sort fuction

    #include <stdio.h>
    #include <string.h>
    int get_min_range(const char *list, int first,int last)
    {
    int i, j, min_pos;
    for (i=first; i<=last; i++) {
    min_pos = i;
    for (j=first; j<=last;...
  22. Replies
    5
    Views
    1,035

    Thanks, I solved the problem. #include...

    Thanks, I solved the problem.

    #include <stdio.h>
    #include <string.h>
    int main(void)
    {
    int first, next,n, x;
    char code[40], warehouse[20], qualifiers[20], product[20];
    printf("Enter...
  23. Replies
    5
    Views
    1,035

    First of all, it does not give proper output....

    First of all, it does not give proper output.
    İts output:
    Warehouse: ALT
    Product: 232S1
    Qualifiers: 123
    And I will look at strtok.But I guess the problem is in my if statements.
  24. Replies
    5
    Views
    1,035

    String question

    Hi,
    Again a question from Koffman's book;
    Question inputs a string and separate it into components.
    For example;
    Input :
    ALT1203S14
    Output:
    Warehouse: ALT
    Product: 1203
    Qualifiers: S14
  25. Replies
    31
    Views
    8,100

    Thanks for your help I think, we solved problem....

    Thanks for your help
    I think, we solved problem.

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    #define ROWS 25
    #define COLS 25
    void game_of_life(char o_arr[][COLS], char...
Results 1 to 25 of 48
Page 1 of 2 1 2