Search:

Type: Posts; User: Andersonsacanno

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,026

    age of c text books

    does the age of any arbitrary C "teach yourself to program" text books matter? Has the language evolved since say 1988? I've been teaching myself for a few months and am ready to take it to the...
  2. Replies
    8
    Views
    1,580

    Thank you so much!

    Thank you so much!
  3. Replies
    8
    Views
    1,580

    Thank you...now what happens in this situation.....

    Thank you...now what happens in this situation..

    take 5 for example..

    5 == 00000101 in binary
    if you perform 5>>1, it becomes 00000010

    How can bitwise operators be used in encryptions...
  4. Replies
    8
    Views
    1,580

    Yes, I just get lost pretty quickly. From my...

    Yes, I just get lost pretty quickly. From my understanding were shifting binary number places around? So basically I have get an understanding of the numbers I am using in binary form before this...
  5. Replies
    8
    Views
    1,580

    Understanding Bitwise Operators in C

    Hello, I am currently a beginner in both programming and cryptography. I have written a few real basic encryptions that just use simple math and from what it seems I need to get a grasp on bitwise...
  6. Replies
    35
    Views
    3,712

    #include #include #include...

    #include <stdio.h>
    #include <conio.h>
    #include <string.h>
    void append(char* start, char temp)
    {
    int len = strlen(start);
    start[len] = temp;
    start[len+1] = '\0';
    }
    int main()
  7. Replies
    35
    Views
    3,712

    My friend and I have been able to read the...

    My friend and I have been able to read the numbers from the file, change them from ascii (char) into ints, then sort them using the same functions I used my original sort and fprintf to a file. I...
  8. Replies
    35
    Views
    3,712

    Thank you. Next up: Reading numbers from...

    Thank you.


    Next up: Reading numbers from file
  9. Replies
    35
    Views
    3,712

    fwrite sucks < fprintf rocks #include...

    fwrite sucks < fprintf rocks



    #include <stdio.h>
    #include <conio.h>


    void swap (int *a, int *b)
    {
  10. Replies
    10
    Views
    1,669

    Solved: Something had to have been incorrect...

    Solved:

    Something had to have been incorrect with my permissions on C: drive.

    Tried switching to a desktop file which still returned failure.

    This is the correct way to write code to files...
  11. Replies
    10
    Views
    1,669

    File I/O stopped working.

    Strange occurence when working with file input output:

    Here is my code.


    #include <stdio.h>
    int main()
    {
    FILE *fp;
    fp=fopen("c:\\test.txt", "wb");
  12. Replies
    35
    Views
    3,712

    Judging from what you've said and the fwrite...

    Judging from what you've said and the fwrite source I tried these:



    FILE *fp;
    fp=fopen("c:\\test.txt", "w");
    fwrite(a, sizeof(100), 100, fp);
    fclose (fp);
  13. Replies
    35
    Views
    3,712

    #include #include ...

    #include <stdio.h>
    #include <conio.h>


    void swap (int *a, int *b)
    {
    int temp;
    temp = *a;
    *a = *b;
    *b = temp;
  14. Replies
    35
    Views
    3,712

    Aha! Back in business! So i was telling it to...

    Aha! Back in business!

    So i was telling it to sort the locations not the values?
  15. Replies
    35
    Views
    3,712

    Thank for your code adak, however it only runs...

    Thank for your code adak, however it only runs what I depict as a printing a ton of ram locations; I am having the same problem.



    #include <stdio.h>
    #include <conio.h>


    void swap (int...
  16. Replies
    35
    Views
    3,712

    I guess this is more or less a bubble sort that...

    I guess this is more or less a bubble sort that moves int's backwards..i realize its not a selection sort, why its not a selection sort, and have learned a lot so its a success, now I will be trying...
  17. Replies
    35
    Views
    3,712

    sorry to keep posting it up but I understand now!...

    sorry to keep posting it up but I understand now! (Programming is so awesome)
  18. Replies
    35
    Views
    3,712

    Nevermind, I have been playing with it and...

    Nevermind, I have been playing with it and changed the inner loop to go other way..



    for (j=i; j >= 0; j--)


    It works guys!

    What i don't understand is why this works. I can't visually...
  19. Replies
    35
    Views
    3,712

    :D Last night while you were helping me my...

    :D

    Last night while you were helping me my code was working (i realize this isn't a selection sort but it's not really a big deal)

    here is the output



    Spots in array:
    5
  20. Replies
    35
    Views
    3,712

    Wow guys thanks for all the help!

    Wow guys thanks for all the help!
  21. Replies
    35
    Views
    3,712

    #include #include void...

    #include <stdio.h>
    #include <conio.h>


    void swap (int *a, int *b)
    {
    int temp;

    temp = *a;
    *a = *b;
  22. Replies
    35
    Views
    3,712

    I'm sorry std10093 I'm lost with that statement. ...

    I'm sorry std10093 I'm lost with that statement. I have no idea how to iterate what you are asking me. Why would j have a value of x-1?
  23. Replies
    35
    Views
    3,712

    My mistake on the second expression of the for...

    My mistake on the second expression of the for loop :o need to be more careful obviously..




    for (i = 0; i < x; i++) //quits when i is larger than x
    {

    for(j=i; j < x; i--) // isn't...
  24. Replies
    35
    Views
    3,712

    wouldn't using j = i in the second loop allow the...

    wouldn't using j = i in the second loop allow the data in my sort function to pass through the original for loop after each pass? Is this what you are refering too?
  25. Replies
    35
    Views
    3,712

    Selection Sort

    Hello i have recently started programming in C and have managed to put together my first selection sort program.




    #include <stdio.h>
    #include <conio.h>
    int sort(int a[], int x)
    {
    int i,...
Results 1 to 25 of 25