Search:

Type: Posts; User: enkwiringmindz

Search: Search took 0.00 seconds.

  1. Replies
    9
    Views
    2,504

    %u, very helpful, thanks.

    %u, very helpful, thanks.
  2. Replies
    9
    Views
    2,504

    OK I think I see that C does not allow unsigned...

    OK I think I see that C does not allow unsigned integers of this magnitude, but the bit representation is still all ones, correct? That's all that really matters to me.
  3. Replies
    9
    Views
    2,504

    Yea it makes sense to me for signed integers, but...

    Yea it makes sense to me for signed integers, but for unsigned integers I am not clear why this is also the case. Guess I should brush up on two's complement.
  4. Replies
    9
    Views
    2,504

    Even with unsigned integers?

    Even with unsigned integers?
  5. Replies
    9
    Views
    2,504

    Unary NOT on 32-bit integers

    How come performing the unary NOT (~) opertion on int x = 0 gives the value of -1 and not a saturated int value?
  6. OK I see, thanks a lot for your help.

    OK I see, thanks a lot for your help.
  7. I should have mentioned the return value is...

    I should have mentioned the return value is actually a char not int, it should still return 255 though right?
  8. Ternary Operator and Saturation Arithmetic

    Can someone explain to me how come these two operations yield different return values, using x=200, y=100?



    // this returns 200
    ((x + y) > 255) ? (255) : (x + y);

    // this returns 255...
  9. Replies
    4
    Views
    10,036

    OK I got it, appreciate your help.

    OK I got it, appreciate your help.
  10. Replies
    4
    Views
    10,036

    Convert char* to WORD*

    I need to convert a char* to a unsigned int* for input into an RC5 encryption algorhythm method. The program ends up crashing when trying to use the converted type. How can this conversion be made...
  11. Replies
    6
    Views
    19,907

    The min-max algorithm can be used for this. ...

    The min-max algorithm can be used for this. Research min-max algorithm, and I think once you understand the algorithm, it is easy to program.
  12. Updating A Database From A Web Service

    I have this code in a web service, but when I try to update the database using the second method (setContacts), it does not update at all, although I do not get an error message.



    [WebMethod] ...
  13. Replies
    6
    Views
    2,954

    Good explanation. Thanks for the help guys.

    Good explanation. Thanks for the help guys.
  14. Replies
    8
    Views
    2,926

    Haha, of course, that works, thanks...thought...

    Haha, of course, that works, thanks...thought fread was void type.
  15. Replies
    8
    Views
    2,926

    my problem input = malloc(512); ...

    my problem


    input = malloc(512);
    fread(input,1,512,file);

    printf("%d\n", strlen(input));
    printf("%s\n", input);

    fclose(file);
  16. Replies
    8
    Views
    2,926

    I read the text using fread(input,1,512,file). ...

    I read the text using fread(input,1,512,file). It is odd though that if I use "aaaaaaaaa", the input is equal to "aaaaaaaastem;C:\program files..."???? It works fine with some input like "aaaaa"
  17. Replies
    8
    Views
    2,926

    OK I see when I print, it looks like notepad...

    OK I see when I print, it looks like notepad appends some random character to the end of the file. Any idea what is going on with that character? Thank you so much for helping.
  18. Replies
    8
    Views
    2,926

    character arrays

    Please help me understand. I read a char*input from a text file with "aa" as text. If each char is 8 bytes, how can it be that strlen(input) is not equal to 16, but 5? Thanks.
  19. Replies
    6
    Views
    2,954

    OK I see. Thanks a lot.

    OK I see. Thanks a lot.
  20. Replies
    6
    Views
    2,954

    C Strings and * Operator

    How come you do not have to use the dereference operator when printing the string my_string in the following code?



    char *my_string = malloc(sizeof(*my_string)*100);

    printf("Enter a...
Results 1 to 20 of 20