Search:

Type: Posts; User: staticalloc

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    2,589

    THANKS! I changed the code as you said and it...

    THANKS! I changed the code as you said and it works.




    #include<stdio.h>

    struct student
    {
    char name[30];
  2. Replies
    4
    Views
    2,589

    okay, I made some changes to make it more...

    okay, I made some changes to make it more readable
    my compiler gives me several errors and warnings
    like unknown field etc


    #include<stdio.h>


    void calcu (struct student* );
  3. Replies
    4
    Views
    2,589

    passing struct to function help

    Im trying to pass elements of a structure to a function (call by reference)

    This code suppose to work like this:
    Enter students name and Points
    then calculate points to grade in a function.
    ...
  4. Replies
    3
    Views
    4,542

    thanks Dave! I figured out to use random...

    thanks Dave!

    I figured out to use random integers and cast it double

    if I need -0.5 to 0.5

    int min -500 to 500
    then divide by 1000
  5. Replies
    3
    Views
    4,542

    random min -0.5 to 0.5

    Hi there :D

    could someone explain

    rc= rand()% (max-min+1)+min ;
    because I do not understand the term after modulus %.
    I got this code from the homepage and was wondering how to use it...
  6. Replies
    4
    Views
    2,372

    silly me. THX!!!!! well I use lcc win32, and...

    silly me. THX!!!!!


    well I use lcc win32, and it didn´t give a warning ar an error. :confused: Any suggestion?
  7. Replies
    4
    Views
    2,372

    me lamer need help- fprintf

    Hi everyone

    well I have a new problem that makes me go crazy.

    let me explain this code

    enter n, steps x1

    example:
    n=6 ; x1=1.25 ---->1.25 2.5 3.75 5 6.25 7.5
  8. Replies
    17
    Views
    5,687

    I added fflush to my code and it works!!! YES! It...

    I added fflush to my code and it works!!! YES! It feels so good!

    thanks guys
  9. Replies
    17
    Views
    5,687

    thanks to everyone for your reply, but this is...

    thanks to everyone for your reply, but this is still really frustrating. I dont get any error nor warnings. Whats wrong with my algorithm?
  10. Replies
    17
    Views
    5,687

    well I still can´t see why this programm wont...

    well I still can´t see why this programm wont work :confused:




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


    FILE *fp;
  11. Replies
    17
    Views
    5,687

    well now the file didn´t change at all after "r+"...

    well now the file didn´t change at all after "r+"

    Im trying a simple file encryption.
    I
  12. Replies
    17
    Views
    5,687

    read and write to file

    /*very very simple encrytion*/
    fp=fopen("message.txt","r+");
    do
    {
    c=fgetc(fp);
    xy=(c+1)%256;
    fputc(xy, fp);
    }while(c!=EOF);
    fclose(fp);
  13. Replies
    2
    Views
    1,208

    call by reference question

    Id like to pass 1 variable from main to funk and receive more than one back to printf on main.
    Well I guess I can give an array from main then use the elements array(0...n] in funk and print it out...
  14. Replies
    5
    Views
    1,055

    Im so confuse :confused:

    Im so confuse :confused:
  15. Replies
    5
    Views
    1,055

    thx for your help. How about this example? which...

    thx for your help. How about this example? which of this three is a pointer data type ?


    int cars[5][4][3};

    auto=cars[3][2][1];

    auto=cars[3][2][1];

    auto=cars[3][2][1];
  16. Replies
    5
    Views
    1,055

    is this a pointer data type?

    int x;
    .
    scanf("%d",&x); &x <----- pointer data type?

    how do I recognize a pointer data type?
  17. Replies
    2
    Views
    12,867

    whoohooo it works! THX! :D I need new...

    whoohooo it works!

    THX!

    :D I need new glasses
  18. Replies
    2
    Views
    12,867

    how to #define INT MAX?

    #include<stdio.h>
    #include<limits.h>
    #define MAXIMUM INT MAX
    .
    .
    quo=x/MAXIMUM;
    .


    is it Okay to define MAXIMUM to the value of INT MAX?
  19. Replies
    1
    Views
    1,539

    Nassi-Schneidermann online tutor

    Im looking for some examples about C --> Nassi-Schneidermann diagramm.
  20. Replies
    9
    Views
    1,029

    1. void main() is bad? Am I suppose to use int...

    1. void main() is bad? Am I suppose to use int main(){return 0;} ?
    2. type cast is no no in C? I thought without type casting, malloc will return a pointer to void by default?
  21. Replies
    9
    Views
    1,029

    thanks for the advice and help.

    thanks for the advice and help.
  22. Replies
    9
    Views
    1,029

    I´m new and need help

    Hi everybody!

    Im an absolute beginner in c coding. I still have problems with dyn allocation and pointers. :rolleyes:

    could somebody help me with this? It calculates the skalar product of 2...
Results 1 to 22 of 23