Search:

Type: Posts; User: Salem

Page 1 of 20 1 2 3 4

Search: Search took 0.33 seconds.

  1. Replies
    9
    Views
    282

    Please attach your text file as text, not a...

    Please attach your text file as text, not a broken inline picture.

    What is 'buffer' initialised to prior to calling malloc?

    What stops 'o' from running past the end of allocated space?
  2. Replies
    5
    Views
    274

    The symbol is resolved by libX11.so $ nm -D...

    The symbol is resolved by libX11.so


    $ nm -D /usr/lib/x86_64-linux-gnu/libXext.so | grep XOpenDisplay
    $ nm -D /usr/lib/x86_64-linux-gnu/libX11.so | grep XOpenDisplay
    000000000002d370 T...
  3. Replies
    6
    Views
    310

    The code is getting uglier, but is it getting any...

    The code is getting uglier, but is it getting any quicker?
  4. Replies
    2
    Views
    204

    PlaySound function (Windows) | Microsoft Docs...

    PlaySound function (Windows) | Microsoft Docs
    1. Trying to pass 4 parameters to a function expecting only 3 should have at least got you a warning message.
    It should be an error.

    The last 'two'...
  5. You could do the double fork. if ( fork() ==...

    You could do the double fork.


    if ( fork() == 0 ) {
    if ( fork() == 0 ) {
    execvp(*arg, arg);
    } else {
    _exit(0);
    }
    }
  6. Replies
    7
    Views
    278

    Use %p if you want to print a pointer.

    Use %p if you want to print a pointer.
  7. Replies
    9
    Views
    525

    > In what respect does fgets() differ from...

    > In what respect does fgets() differ from gets()?
    fgets won't overrun the end of the buffer you supply, so long as you're honest about the size of the buffer.

    > what is the size of the said...
  8. Replies
    6
    Views
    310

    > Does the modification make any difference ?...

    > Does the modification make any difference ?
    Why haven't you tested it?

    > If so is that modification more efficient ?
    Why haven't you tested it?

    Here are some test cases
    - the...
  9. Thread: matrix Problem

    by Salem
    Replies
    1
    Views
    201

    https://cboard.cprogramming.com/announcement.php?a...

    https://cboard.cprogramming.com/announcement.php?a=39
    Make an effort.
    Just dumping your assignment isn't good enough.
  10. https://cboard.cprogramming.com/announcement.php?a...

    https://cboard.cprogramming.com/announcement.php?a=39
    Make an effort.
    Just dumping your assignment isn't good enough.
  11. Replies
    25
    Views
    1,127

    Your indentation is STILL a mess. You don't call...

    Your indentation is STILL a mess.
    You don't call your function from main, so - really - nothing happens.
  12. Replies
    2
    Views
    325

    > I have an exe project with a large struct in...

    > I have an exe project with a large struct in it.
    What constitutes 'large'?
    1KB
    4KB
    64KB
    1MB
    ?

    What happens in the DLL if it dereferences the pointer to supposedly read a garbage value,...
  13. Just delete the call to wait(NULL);

    Just delete the call to wait(NULL);
  14. Replies
    2
    Views
    215

    Maybe you can use %s instead of %c in the last...

    Maybe you can use %s instead of %c in the last case.

    Or learn to use your compiler.


    $ gcc -Wall foo.c
    foo.c: In function ‘main’:
    foo.c:8:12: warning: format ‘%c’ expects argument of type...
  15. Replies
    25
    Views
    1,127

    > I have removed the const input and below is my...

    > I have removed the const input and below is my code. please check it.
    How about you indent it properly first.
    It's a dogs breakfast.
  16. Replies
    3
    Views
    340

    > cur_data is a global variable Ugh, why isn't...

    > cur_data is a global variable
    Ugh, why isn't it a parameter?



    static void dump(void *cur_data, const char *prefix, size_t size)
    {
    switch(size){
    case sizeof(struct A): {
    ...
  17. Replies
    15
    Views
    712

    Look at your picture in post #9 if (...

    Look at your picture in post #9



    if ( List->Head == NULL ) {
    // update head and tail to point to the node you created
    } else {
    // add the node to where tail points, and adjust tail.
    }
  18. What is the major difference between C and C++ at...

    What is the major difference between C and C++ at DuckDuckGo

    And no, you're not going to understand C++ just by knowing the differences (of which there are many).
  19. Replies
    1
    Views
    280

    Also here -> Building A Online Compiler - C++...

    Also here -> Building A Online Compiler - C++ Forum
    With spam.
  20. Replies
    1
    Views
    278

    Even a simple search would tell you the answer....

    Even a simple search would tell you the answer.
    C keywords - cppreference.com

    But this is the 2nd time I've deleted your spammy links.
    It will be your last.
  21. Replies
    1
    Views
    293

    First off, indent...

    First off, indent your code.


    #include<stdio.h>
    #include<math.h>

    int inrange(int, int, int, int);
    int cubesum(int, int, int, int);
    int avsqrsum(int, int, int, int);
    int squaresum(int, int,...
  22. Replies
    4
    Views
    377

    Probably the easiest thing to do is to use fgets...

    Probably the easiest thing to do is to use fgets instead of fscanf


    char buff[BUFSIZ];
    while ( fgets(buff, BUFSIZ, f) ) {
    if(sscanf(buff, "%f,%f,%f,%f", &x[n][0], &x[n][1], &x[n][2],...
  23. Replies
    9
    Views
    629

    > I completely understand pointer, dynamic memory...

    > I completely understand pointer, dynamic memory allocation and structure.
    But the list you create in post #4 contains a garbage node at the end of your list.
    If you want to have a more complete...
  24. > code works, what would be a better way to write...

    > code works, what would be a better way to write the sqrt_function?
    Only by dumb luck.



    double sqrt_function (double number)
    {
    double answer = sqrt (number);// you were just ignoring...
  25. Google translate says 1. This is an English...

    Google translate says

    1. This is an English speaking forum.
    2. You need to at least make some effort to solve the problem (more than just copy/pasting from your assignment).
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4