Search:

Type: Posts; User: cs05pp2

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Thread: rand() & float

    by cs05pp2
    Replies
    3
    Views
    2,281

    One answer by me, but I don't know if it is the best.

    num=(rand()%3) == 2 ? 2.0 : (rand()%2) + (float)(rand()%1000000)/1000000;
  2. Thread: rand() & float

    by cs05pp2
    Replies
    3
    Views
    2,281

    rand() & float

    I want to get random float numbers from 0 to 2 (included). How do I do this?
  3. Replies
    2
    Views
    1,109

    Multidimensional Arrays

    Why is not essential to give the size of the first dimension ---eg. int func (int array [] [20], int x));--- when declaring a two dimensional array as a parameter of a function?
  4. Replies
    4
    Views
    2,728

    C code explanation

    #include <stdio.h>

    main(t,_,a)
    char *a;
    {return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
    main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
    )&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d...
  5. Replies
    11
    Views
    54,855

    If I define #define array "abcdef" int...

    If I define


    #define array "abcdef"

    int main()
    {
    printf("%c", array[0]);

    return 0;
  6. Replies
    11
    Views
    54,855

    If I use that code is working and compile: ...

    If I use that code is working and compile:


    int main()
    {
    int array[] = {1,2,3,4,5};

    printf("%d", array[0]);

    return 0;
  7. Replies
    11
    Views
    54,855

    #define array[]

    Hello. I have a problem. I want to define a constant array.


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

    #define array[] {'a', 'b', 'c'}


    int main()
  8. Thread: Double problem

    by cs05pp2
    Replies
    11
    Views
    1,962

    Perfect thank you

    Perfect thank you
  9. Thread: Double problem

    by cs05pp2
    Replies
    11
    Views
    1,962

    #include int main() { double a=0;...

    #include <stdio.h>

    int main()
    {
    double a=0;
    printf("Give a Float number (ex. 346.58)");
    scanf("%e", &a);

    printf("\n\n---->%lf\n\n", a);
  10. Thread: Double problem

    by cs05pp2
    Replies
    11
    Views
    1,962

    GCC Compiler.

    GCC Compiler.
  11. Thread: Double problem

    by cs05pp2
    Replies
    11
    Views
    1,962

    I use two kind: FreeBSD and Fedora

    I use two kind: FreeBSD and Fedora
  12. Thread: Double problem

    by cs05pp2
    Replies
    11
    Views
    1,962

    With %le the result is 5.609771e-315. But I...

    With %le the result is 5.609771e-315.


    But I want 346.58.
  13. Thread: Double problem

    by cs05pp2
    Replies
    11
    Views
    1,962

    Double problem

    Hello again. I have problem with double printing.



    #include <stdio.h>

    int main()
    {
    double a=0;
  14. Thread: Floating round

    by cs05pp2
    Replies
    8
    Views
    1,093

    Perfect Thank you

    Perfect Thank you
  15. Thread: Floating round

    by cs05pp2
    Replies
    8
    Views
    1,093

    Thank you very much. But if I print ...

    Thank you very much.
    But if I print

    printf("\n\n%f\n\n", k);

    the result is 1.5899. How I disable round in printf?
  16. Thread: Floating round

    by cs05pp2
    Replies
    8
    Views
    1,093

    Floating round

    Hello to everyone, I have a small problem.

    My example code:



    #include <stdio.h>

    int main()
    {
  17. Replies
    2
    Views
    2,175

    multithreads

    I im reading Williams Stalling book for operating systems and he use semaphores , monitors and message passing. I just want to see real c code of monitors example.

    Thank you.
  18. Replies
    2
    Views
    2,175

    Monitor and Semaphores

    Hi. How can I write a monitor form my multithret program? Where I can find examples for c?

    Thank in advance
  19. Thread: cygwin

    by cs05pp2
    Replies
    4
    Views
    1,274

    Any other way. Some dll or library that I can...

    Any other way. Some dll or library that I can use? And some good documentation that I can start form with a simple tutorial?
  20. Thread: cygwin

    by cs05pp2
    Replies
    4
    Views
    1,274

    cygwin

    Any one who knows how to use cygwin dll to write a cd burning software?

    Where I can find tutorials or documentation?
  21. Thread: cds burning

    by cs05pp2
    Replies
    1
    Views
    1,365

    cds burning

    What Libraries, sdks I need to write a cd burning software?
  22. Thread: Viewer

    by cs05pp2
    Replies
    3
    Views
    1,334

    linux. bmp

    linux. bmp
  23. Replies
    7
    Views
    1,322

    malloc

    type x = (type *) malloc(sizeof(type));

    sizeof(type) counts the size of the variable for example


    (int*)malloc(sizeof(int))

    get 4bytes mem
  24. Thread: Need help!

    by cs05pp2
    Replies
    3
    Views
    956

    Solution

    #include <stdio.h>

    int main (){
    int counter;
    int counter2;

    system("clear"); //clear the consol
    for (counter=1; counter < 6; counter++){
    printf("| ");
    for(counter2=1;...
  25. Thread: Viewer

    by cs05pp2
    Replies
    3
    Views
    1,334

    Viewer

    I want to write with c a picture viewer what libraries I will need?
Results 1 to 25 of 34
Page 1 of 2 1 2