Search:

Type: Posts; User: Timmy10

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    13,867

    So I should never cast? Like is that a bad...

    So I should never cast? Like is that a bad practice?
  2. Replies
    1
    Views
    2,567

    Multiple functions issues

    I think my functions are ok but when interconnected with each it is not doing what I want it to. Any way in how to fix it?


    # include <stdio.h>
    #include <stdlib.h>


    # define MAX_LIMIT 42
  3. Replies
    15
    Views
    13,867

    I understand what you are trying to get at but...

    I understand what you are trying to get at but what exactly is my mistake? Please bear with me.
  4. Replies
    15
    Views
    13,867

    I don't understand what you mean by me casting...

    I don't understand what you mean by me casting the return value of malloc.
  5. Replies
    15
    Views
    13,867

    @laserlight When trying to compile these are the...

    @laserlight
    When trying to compile these are the errors I am facing. Unsure of how to fix them.

    In function ‘main’:
    main.c:31:15: warning: assignment from incompatible pointer type...
  6. Replies
    15
    Views
    13,867

    I did what you mentioned but it is still not...

    I did what you mentioned but it is still not working. Sorry for causing you inconvenience.
  7. Replies
    15
    Views
    13,867

    Could you kindly please explain what casting the...

    Could you kindly please explain what casting the result of malloc means?
  8. Replies
    15
    Views
    13,867

    Help needed to debug

    I wrote this code but cannot figure out the issues that arise when trying to compile.


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>


    int find_First_Letter (char **word_Array,...
  9. Replies
    7
    Views
    5,762

    @salem

    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>


    int cmpstr(void* v1, void* v2)
    {
    char *a1 = *(char**)v1;
    char *a2 = *(char**)v2;
    return strcmp(a1, a2);
  10. Replies
    7
    Views
    5,762

    Sorry @salem. Posting it again

    Sorry @salem. Posting it again
  11. Replies
    7
    Views
    5,762

    Made some changes

    @salem I made a few tweaks. Now it comes to segmentation fault.


    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>


    int cmpstr(void* v1, void* v2)
    {
  12. Replies
    7
    Views
    5,762

    Sorting strings in C

    So I got the sorting program to work when I set the array without any numbers. However when reading from a file which has numbers before the word it is not behaving the way I want it to.

    ...
  13. Replies
    5
    Views
    4,597

    I'm sorry but I just cannot seem to find the...

    I'm sorry but I just cannot seem to find the error.
  14. Replies
    5
    Views
    4,597

    So, I did this and now it does not compile. ...

    So, I did this and now it does not compile.




    #include<stdio.h>
    #include<stdlib.h>
    #include<time.h>
    #define MAX_QUERIES 12
    #define N_DIGITS 4
  15. Replies
    5
    Views
    4,597

    I've been stuck at this for a while

    The following program works when valid input is entered. When invalid input is entered it goes into a loop and stops working. I have included the code along with how I want the code to behave when...
  16. User to figure out a random number generated by the system.

    My code compiles and runs but some parts are not giving the required output. I cannot seem to figure it out. Included are the code and the desired output.
    16247

    16248

    16249

    ...
  17. Replies
    8
    Views
    7,325

    What would that loop look like?

    What would that loop look like?
  18. Replies
    8
    Views
    7,325

    How do I fix that error?

    How do I fix that error?
  19. Replies
    8
    Views
    7,325

    It terminates after computing for the first input.

    It terminates after computing for the first input.
  20. Replies
    8
    Views
    7,325

    Prime factorization of a number

    So I am writing a code where the program will keep asking for a number and calculate its prime factorization unless the user enters 1 or less. What am I doing wrong?


    #include<stdio.h>
    int...
  21. Replies
    0
    Views
    5,204

    How to complete the problem

    Only stdio.h is allowed. The ABRACADABRA language has just five lowercase letters a,b,c,d,r, and every combination of these letters (but no other letters) is a word in the ABRACADABRA language. For...
  22. Replies
    10
    Views
    4,899

    so goto is always bad?

    so goto is always bad?
  23. Replies
    10
    Views
    4,899

    There can be spaces between the other characters...

    There can be spaces between the other characters just not between a and Y. Also if the equation is valid like you can see in the second run where bla bla is inputted it will still give out the...
  24. Replies
    10
    Views
    4,899

    Cannot figure out the rest of the program

    I can only use <stdio.h> for the problem.
    I wrote most of it out but cannot figure out the special cases.

    #include <stdio.h>
    #define VARIABLE_NAME 'Y'
    int main()
    {
    double a, b, c, d;
    ...
Results 1 to 24 of 25