Search:

Type: Posts; User: xabhi

Search: Search took 0.01 seconds.

  1. Replies
    9
    Views
    9,289

    first of all you've declared the character array...

    first of all you've declared the character array incorrectly..


    char *temp[len];

    should be


    char temp[len];
  2. Thread: Switch process

    by xabhi
    Replies
    4
    Views
    4,024

    yes, the parent process starts the child, but...

    yes, the parent process starts the child, but just after the call to fork() the child executes first. the reason is to enable safe copy-on-write.
  3. Thread: Switch process

    by xabhi
    Replies
    4
    Views
    4,024

    when you use fork, the child process is always...

    when you use fork, the child process is always started first...



    after the fork() call the child process becomes an independent process and thus, is scheduled interdependently with other...
  4. i think the logic of your program isn't quite...

    i think the logic of your program isn't quite correct... for eg..


    if(( a + b > c) || ( b + c > a) || ( a + c > b))

    should be..


    if(( a + b > c) && ( b + c > a) && ( a + c > b))
  5. Replies
    9
    Views
    3,132

    seriously.. what is wrong with me.. i'm not that...

    seriously.. what is wrong with me.. i'm not that stupid you know...
  6. Replies
    9
    Views
    3,132

    no it's not...

    no it's not...
  7. Replies
    9
    Views
    3,132

    the most efficient way is this.. if...

    the most efficient way is this..



    if (number > 9)
    number = number % 9;

    return number;

    here the number is what the use inputs... for eg. if number = 12345, then 12345%9 = 6
  8. Replies
    2
    Views
    3,554

    use system command. or a better way would be to...

    use system command. or a better way would be to use the exec family.
  9. Replies
    3
    Views
    903

    realloc may readjust the data in the memory as it...

    realloc may readjust the data in the memory as it resizes the segment. so if you realloc a string chances are the returned pointer may not contain a valid string..
  10. Replies
    6
    Views
    1,550

    clearly missed these points... thanks

    clearly missed these points... thanks
  11. Replies
    6
    Views
    1,550

    m = ++i && ++j || ++k; the logical operators...

    m = ++i && ++j || ++k;

    the logical operators && and || are short-circuit operators with left to right associativity. so in above expression, evaluation starts from the left most variable, i.e. i,...
  12. Replies
    6
    Views
    1,339

    corrected -

    here's a code i wrote to find out how non-blocking read works...




    #include<stdio.h>
    #include<stdlib.h>
    #include<fcntl.h>
    #include<errno.h>
  13. Replies
    6
    Views
    1,339

    why wont anybody answer??? why???

    why wont anybody answer??? why???
  14. Replies
    16
    Views
    3,501

    you haven't initialized sum_int here... int...

    you haven't initialized sum_int here...


    int sum_digits(int number)
    {
    int remainder, sum_int;

    while(number!=0 && remainder!=0)
    {
    sum_int= sum_int+ number- number/10*10;
  15. Replies
    6
    Views
    1,339

    thanks.. i know about non canonical input. the...

    thanks.. i know about non canonical input. the thing is that if this read was reading from an open file it would have returned after reading data from it, without the need of any key press. it's the...
  16. Replies
    6
    Views
    1,339

    what am i missing here??

    here's a code i wrote to find out how non-blocking read works...



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

    int main()
  17. Replies
    8
    Views
    1,298

    you can write an application agent module,...

    you can write an application agent module, similar to those used by antiviruses, media player etc. like winamp uses it's agent to maintain file association and prohibits other apps from changing it. ...
  18. Replies
    4
    Views
    1,087

    thanks a lot for your time. how to do this...

    thanks a lot for your time.



    how to do this with curses? the functions that support non-blocking input are also available for everything else. and i don't recall any other function specific to...
  19. Replies
    4
    Views
    1,087

    a timed terminal...

    hi, i wanted to emulate a terminal that asked for a user input, like login name, but doesn't wait for it indefinitely. a timer runs in the background and if no hit is received from the keyboard...
  20. Replies
    5
    Views
    2,075

    no, this is not my homework and i did not ask for...

    no, this is not my homework and i did not ask for a complete solution. read my post again. i only asked if anybody can provide me with a link or something to the answer if it's OTI. also, it's one of...
  21. Replies
    5
    Views
    2,075

    The C Programing Language soln needed

    hi.. can anybody point me to the solution to a particular exercise question? it's the last question of the exercise of the 5th chapter, Pointers and Arrays, which is about generalizing the dcl...
  22. Replies
    3
    Views
    1,319

    thanks...

    thanks...
  23. Replies
    3
    Views
    1,319

    Viewing variable memory...

    hi, i wrote the following program to print out the contents of the memory of a variable. to handle different types, i have used macros definition combined with a void pointer...

    ...
Results 1 to 23 of 24