Search:

Type: Posts; User: itCbitC

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    16
    Views
    7,511

    Not sure where your are going with this, since...

    Not sure where your are going with this, since the *nix copy (cp) command does exactly that.
    It reads data from a source file into a buffer, followed by writing that buffer to a destination file.
  2. Replies
    7
    Views
    812

    AFAIK, there is no upper limit on array rank in...

    AFAIK, there is no upper limit on array rank in C, but it may get confusing and cumbersome during coding to refer to or use it correctly.
  3. Multi-dimensional arrays are initialized at the...

    Multi-dimensional arrays are initialized at the same time as declaring them, as in:

    char x[20][100] = {0};
    As far as shared memory goes, it is conceptually the same as any client-server program....
  4. Replies
    8
    Views
    1,114

    For option 2, the MySQL database connection calls...

    For option 2, the MySQL database connection calls i.e. mysql_init() and mysql_real_connect() are missing?
    Those calls should be present in option 2 also or you could factor both of them out into a...
  5. You need to state your requirements clearly. We...

    You need to state your requirements clearly. We can't read your mind so please be as descriptive as possible of what you are trying to solve.
  6. You'd use Windows communications functions like:...

    You'd use Windows communications functions like:

    CreateFile() /* opens the com port */
    ReadFile() /* reads from the com port */
    WriteFile() /* writes to the com port */
    CloseHandle() ...
  7. A compact way would be: char name[100];...

    A compact way would be:


    char name[100];
    scanf("%[^\n]", name);

    The above will grab any and all characters excluding the newline on all *nix platforms. On Windows, Mac or other OSes this may...
  8. Replies
    1
    Views
    723

    You're getting a stack overflow because gcd(), a...

    You're getting a stack overflow because gcd(), a recursive function, gets called repeatedly and never returns for -ve numbers.
    I'd suggest you first do this the old fashioned way i.e. using paper...
  9. Replies
    1
    Views
    673

    Are you trying to implement the string version of...

    Are you trying to implement the string version of insertion sort?

    If so I'd suggest using pointers to strings instead of a 2d array. It'd save costly processing time by eliminating calls to...
  10. Replies
    3
    Views
    2,126

    Are you using a makefile or just plain command...

    Are you using a makefile or just plain command line compilation?
    Either way it'd the same switch "-o <libxyz.a>" for naming the generated output file.
  11. Replies
    10
    Views
    868

    Gotcha!

    Gotcha!
  12. Replies
    10
    Views
    868

    Just out-of-curiosity how a library made for...

    Just out-of-curiosity how a library made for Windows installed just fine on UNIX?
  13. It doesn't apply to bits since memory is byte...

    It doesn't apply to bits since memory is byte organized i.e. the smallest group of bits that can be addressed is 8.

    The bit in serial communications that comes first is part of the byte that is...
  14. Just to clarify, all operations (logical or...

    Just to clarify, all operations (logical or arithmetic) give correct results because they take place inside the micro's registers; and all registers that make up a cpu are independent of endianness,...
  15. Replies
    10
    Views
    5,453

    Take a look here...

    Take a look here, which says that __COUNTER__ macro is found only in gcc release 4.3 and above.
  16. Replies
    10
    Views
    5,453

    IMO, it's working as __LINE__, is a global...

    IMO, it's working as __LINE__, is a global directive and __COUNTER__ is being expanded to the __LINE__ number of the code, as in

    abc5
    abc6
    Or if I didn't get it then explain yourself better...
  17. Big endian emulates the natural way of writing...

    Big endian emulates the natural way of writing numbers, at least the way we have been taught where the MSD is the leftmost one.
  18. Replies
    4
    Views
    1,445

    Return the struct Coordinate from CallF(), not a...

    Return the struct Coordinate from CallF(), not a pointer to it!
  19. Replies
    15
    Views
    1,679

    No use iterating over s2 once a match is found....

    No use iterating over s2 once a match is found. Instead terminate the search and move onto the next character in s1. So the above piece of code can be written more efficiently as:


    if (s1[i] ==...
  20. Replies
    15
    Views
    1,679

    The problem lies with the offset of array...

    The problem lies with the offset of array new_string[].
    Its index needs to be separate from that of s1[] or s2[].

    new_string[ i ] = s1[ i ];
  21. Hope this webpage...

    Hope this webpage helps!
  22. Replies
    6
    Views
    1,390

    Because the argument that follows tot_num viz.,...

    Because the argument that follows tot_num viz., 23 in this case
    findmax(5, 23, 15, 1, 92, 50)
    has been picked off by the piece of code below before the for loop starts:

    max = va_arg(ptr, int);...
  23. Replies
    8
    Views
    1,183

    Initialize the variables, sorted, target, end...

    Initialize the variables, sorted, target, end etc., defined in main() before using or passing them to other functions.
  24. Replies
    4
    Views
    2,584

    It's just a name for the new type you have...

    It's just a name for the new type you have created. Consider this:


    typedef enum {small, medium, large} size; /* now size is a new name for "enum {small, medium, large}" */
    size dimension; /*...
  25. Replies
    4
    Views
    2,584

    That's technically referred to as a tag and is...

    That's technically referred to as a tag and is optional.

    Yep!
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4