Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.18 seconds.

  1. Thread: buffer overflow

    by Salem
    Replies
    6
    Views
    134

    Try printing your guesses in hex. It's a bit...

    Try printing your guesses in hex.
    It's a bit more obvious which bytes of your guess are being messed with by your string overflow.
  2. What about it? You should be able to string...

    What about it?

    You should be able to string together .c, .s, .o and .a files on the command line to gcc, and it will pass the relevant files onto the appropriate compilation step.
  3. Thread: f-write stdout

    by Salem
    Replies
    12
    Views
    236

    Yes, you use fprintf() instead. Or you sprintf...

    Yes, you use fprintf() instead.

    Or you sprintf it to a string, then fwrite the string.
  4. Replies
    2
    Views
    105

    /STACK (Stack Allocations) | Microsoft Docs...

    /STACK (Stack Allocations) | Microsoft Docs
  5. The assembler is going to read input from a file,...

    The assembler is going to read input from a file, or from stdin.

    So either
    - write your string to a temporary file, then invoke the assembler with your temp file as a command line parameter.
    -...
  6. Why all the omp, when you then go and slug the...

    Why all the omp, when you then go and slug the system by filling it with sleep() ?

    > The server codewars allow for 12 s time running code.
    Is that wall clock time (which sleep() will influence),...
  7. Replies
    4
    Views
    151

    You need to understand that realloc can move the...

    You need to understand that realloc can move the memory.

    So push_int needs some way to convey that back to main.

    A simple way is to do
    array = push_int(array, &counter, &size, &number);
    ...
  8. Same answer "bro". Make an effort, show where...

    Same answer "bro".
    Make an effort, show where you can get to by your own effort and then we'll help you.

    We're your guide, not your mule.
  9. It's right there on the very web page you just...

    It's right there on the very web page you just pointed us to!.
  10. First of all, we don't just "give code" in...

    First of all, we don't just "give code" in response to people just dumping their assignment on the board.

    If you really want to learn, you need to make an effort to understand some aspect of the...
  11. Replies
    1
    Views
    169

    How have you implemented your stacks to begin...

    How have you implemented your stacks to begin with?
  12. Replies
    1
    Views
    146

    Hard to say where you messed up, when you've...

    Hard to say where you messed up, when you've deleted your code.

    But here's a sequence of exercises.


    int array[5] = { 4, 1, 8, 3, 9 };
    qsort( array, 5, sizeof(array[0]), compare_fn);

    ...
  13. Replies
    16
    Views
    471

    > printf("%d\n", isNumber(".")); Also returns...

    > printf("%d\n", isNumber("."));
    Also returns 1.
  14. Replies
    1
    Views
    204

    Post your code as text, not a broken picture. ...

    Post your code as text, not a broken picture.

    Nevermind, cross-posted here as well.
    Calculate Discount c++ - C++ Forum
  15. Replies
    16
    Views
    471

    That would also return true if you typed in a...

    That would also return true if you typed in a numeric IP address.
  16. Replies
    2
    Views
    175

    The memcpy is the only way to go.

    The memcpy is the only way to go.
  17. Replies
    12
    Views
    373

    1. You need lots of braces. C isn't Python. ...

    1. You need lots of braces. C isn't Python. Just because you indented it nicely doesn't make C follow a different path through the code.

    2. Use == in place of =, if you want to compare two...
  18. > (curr->record.arg1 == record->arg1)...

    > (curr->record.arg1 == record->arg1) && \
    1. You don't need the \ at the end of these lines. You only need \ at the end of complicated #define code blocks.
    2. Make it a separate...
  19. Replies
    3
    Views
    262

    > mylib.h is the header that contains a prototype...

    > mylib.h is the header that contains a prototype for every function.
    Then your test.c should have
    #include "mylib.h"
    not
    #include "lib_string.h"
  20. Replies
    3
    Views
    236

    Well if you're on Linux/Unix, you can do this. ...

    Well if you're on Linux/Unix, you can do this.


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

    int main()
    {
    char *p = NULL;
    printf("trouble ahead\n");
  21. Replies
    4
    Views
    390

    You should use the strtol(), strtoul() or...

    You should use the strtol(), strtoul() or strtod() functions for your string-to-number conversions.
  22. Study the add functions in more detail,...

    Study the add functions in more detail, especially why it's not necessary to return anything with this revised list structure.

    > (curr->record.arg1 == record->arg1) & \
    > ...
  23. Replies
    23
    Views
    1,102

    For future reference, please use "copy as text"...

    For future reference, please use "copy as text" in your code editor, and/or "paste as text" in your browser.
    The colour/font ridden mess isn't sustainable.

    circumference = diameter * pie;
    ...
  24. Replies
    23
    Views
    1,102

    Make it like this. // Enter the value...

    Make it like this.



    // Enter the value of Radius for calculation of above.
    printf("Please enter the value of circle radius \n");
    scanf("%f", &radius);

    // These are the lines that...
  25. Replies
    23
    Views
    1,102

    > diameter = radius * 2; Move all your...

    > diameter = radius * 2;
    Move all your calculations...

    > scanf("%f", &radius);
    AFTER you have read the input data for those calculations.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4