Search:

Type: Posts; User: convenientstore

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    1,653

    Another weird thing. Why is J's value 1 instead...

    Another weird thing. Why is J's value 1 instead of 0 here??



    (gdb) b main
    Breakpoint 1 at 0x100000ad4: file month_reminder.c, line 11.
    (gdb) r
    Starting program: /Users/javaxtra/Desktop/MY/c...
  2. Replies
    13
    Views
    1,653

    Thank you again for all kind response. My...

    Thank you again for all kind response.
    My question is, yes I see that i is being incremented and points to last point position when it reads all input, so at the end, it's pointing to last position...
  3. Replies
    13
    Views
    1,653

    Just one more question, I am failing to see where...

    Just one more question, I am failing to see where the value 'i' (for which is being return) is being used for.. ?



    int read_line(char str[], int n )
    {
    char ch;
    int i = 0;

    ...
  4. Replies
    13
    Views
    1,653

    @anduril462, Thank you for your explanation....

    @anduril462,

    Thank you for your explanation. Very detailed. I understood perfectly.
  5. Replies
    13
    Views
    1,653

    learning gdb

    Here's the code I am studying from "modern day c programming"



    #include <string.h>

    #define MAX_REMIND 50
    #define MSG_LEN 60

    int read_line(char str[], int n);
  6. just in case any other newbie like me wanted to...

    just in case any other newbie like me wanted to see the steps



    #include <stdio.h>

    #define TRUE 1
    #define FALSE 0

    typedef int Bool;
  7. You are right. thank you!! Enter a number:...

    You are right.

    thank you!!

    Enter a number: 123
    digit is 3
    n is 123
    n is 12 after division
    digit is 2
    n is 12
  8. trying something from a book is not working and not understanding why

    Hi, I am testing a below from book " C : a modern approach"..

    I don't understand why this program is not working ... when i put 123, it digit_seen should still be false(intialized all w/ 0).. but...
  9. Replies
    7
    Views
    1,271

    Hi, thanks for replying on this issue. I guess...

    Hi, thanks for replying on this issue.

    I guess I have a problem understanding the syntax of it.
    Wouldn't Ethernet_Frame pointer be --> *Ethernet_Frame ?

    but instead, I have Ethernet_Frame* ...
  10. Replies
    7
    Views
    1,271

    strange * on structure

    ethdr = (ETHERNET_FRAME*)&tmp[0];

    I thought pointer (whether declearing or referencing it), * should be on left side of the word.

    One of the code I was studying, I saw code like above where *...
  11. Replies
    6
    Views
    1,659

    that's what i don't understand. I have gone...

    that's what i don't understand.
    I have gone through other included headers and did not see the __THROW defined anywhere.






    #ifndef _SYS_IOCTL_H
    #define _SYS_IOCTL_H 1
  12. Replies
    6
    Views
    1,659

    trying to understand headers

    extern int ioctl (int __fd, unsigned long int __request, ...) __THROW;

    how does one read above?

    I was thinking global int type function name ioctl has these (....).. but what is
    __THROW...
  13. can someone provide me w/ great tutorial or link...

    can someone provide me w/ great tutorial or link that explains the relationship between multi dimensional array and pointer?

    I can see that char reminders[MSG_LEN+3] is one string vs char...
  14. thanks guys, I certainly now understand what...

    thanks guys,

    I certainly now understand what those loops are doing.
    one more thing however, I really don't understand why it was necessary for multi dimensional array to be need for

    11 ...
  15. thanks guys, I am gonna digest this bit and try...

    thanks guys, I am gonna digest this bit and try few more things and get back to you guys..

    thank you once again!!
  16. example from c programming "a modern approach"

    Hello everybody,

    I have been reading C programming "a modern approach" and I must say this has been my best c book(I am a very very newbie)..
    Anyway, below example from that book has me bit lost...
  17. thank you!!!!

    thank you!!!!
  18. my gosh, yes thank you so much. ...

    my gosh, yes thank you so much.



    (int)(cp-in_line));


    I just have one more question..

    why was there a need to subtract in_line from cp ?
  19. Hi, here it is. root@userA-laptop:/sc/c#...

    Hi, here it is.



    root@userA-laptop:/sc/c# cat cha_handle.c
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    #define LINELNG 100 /* max length of input line */
  20. that didn't work.. anything else?

    that didn't work..

    anything else?
  21. help with this tutorial program: invalid operands to binary( - )

    Hello, I am just going over tutorial on line and working on this character handling program from on line tutorial.

    First of all, I just copy the program but it doesn't compile.
    It complains that...
  22. Replies
    20
    Views
    3,625

    so far this is working fine for me.. ...

    so far this is working fine for me..



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

    main( int argc, char *argv[] )
    {
    //char filename[29];
  23. Replies
    20
    Views
    3,625

    my bad, of course only below code would...

    my bad,

    of course only below code would product 5.. I am still trying to see what everyone was talking about earlier.. will get back to you. thanks



    #include <stdio.h>

    main()
    {
  24. Replies
    20
    Views
    3,625

    sorry, Quzah, but I just tried your code and it...

    sorry, Quzah, but I just tried your code and it actually printed 5.. ?



    [root@Xclient c]# cat variable_print.c
    #include <stdio.h>

    main()
    {
    int x = 5;
  25. Replies
    20
    Views
    3,625

    cyberfish, I certainly understand and appreciate...

    cyberfish, I certainly understand and appreciate your concern.

    Sometimes, I don't understand such simple as

    system("command", "arg1", "arg2"); where arg1 or arg2 can be variables..
    in perl...
Results 1 to 25 of 35
Page 1 of 2 1 2