Search:

Type: Posts; User: lbraglia

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,173

    Pointer troubles

    Hi!

    I'm doing exercises with pointer; in order to create a random sentence generator I programmed an array of pointer to pointer .... to char.
    But when i try to print the string randomly, several...
  2. Replies
    2
    Views
    3,852

    scanf "ignored"

    Hello everybody,

    an exercises of mine: it's a "guess the number" game.
    The repetition of the game is given by a char variable: when the player guess the number I aks him/her if he/she want to...
  3. Replies
    5
    Views
    3,179

    Thank you all (matsp iMalc, anon ), I have fixed...

    Thank you all (matsp iMalc, anon ), I have fixed my bug and now bubble sort "rocks".

    This made me reflect that I have to take a further look at variables memory class and visibility rules (a...
  4. Replies
    5
    Views
    3,179

    You're right, this's surely not the better way to...

    You're right, this's surely not the better way to improve the algorithm ( and I know this is a useless function, since one can use qsort from libc), but if you mean I need pointers, I have not...
  5. Replies
    5
    Views
    3,179

    help with debug (bubble sort algorithm)

    hello, I'm trying to write a version of bubble sort with some
    improvement.

    One of these is that at the end of every pass, the algorithm
    compare the array before and after the bubble sort; if...
  6. Replies
    4
    Views
    1,352

    what a blindness !! :) "=" --> ">=" $:...

    what a blindness !! :)

    "=" --> ">="



    $: ./a.out
    Enter two integers: 12 8
    mcd beetween 12 and 8 is 4
  7. Replies
    4
    Views
    1,352

    I don't see why it does not return 4! is not 4...

    I don't see why it does not return 4! is not 4 the first time



    if ((alpha % divisor == 0) && (beta % divisor == 0))


    is true?
  8. Replies
    4
    Views
    1,352

    a problem with mcd

    Hello everybody: I have problems with a function to perform max com divisor for two integers: here's the code




    #include <stdio.h>
    #include <math.h>

    int mcd( int alpha, int beta);
    int...
  9. Replies
    4
    Views
    2,161

    Ok, it works! :) thank you again

    Ok, it works! :)

    thank you again
  10. Replies
    4
    Views
    2,161

    mmm, maybe I didn't understand something ......

    mmm, maybe I didn't understand something ... this's my new code




    #include <stdio.h>
    #include <math.h>

    int main(void)
    {
  11. Replies
    4
    Views
    2,161

    C Newbie problems with functions (I think)

    Why?




    #include <stdio.h>
    #include <math.h>

    int main(void)
    {
  12. Replies
    6
    Views
    1,420

    well, since "we" are programmers (it would be...

    well, since "we" are programmers (it would be better to say "you...") :)




    #include <stdio.h>

    int main()
    {
  13. Replies
    6
    Views
    1,420

    doh it was so logic! :( the fact is that I've...

    doh it was so logic! :(

    the fact is that I've seen a version of a friend of mine that differ only for while(foo)


    --- my_friend_version.c 2007-09-26 12:14:41.000000000 +0200
    +++...
  14. Replies
    6
    Views
    1,420

    why does while(1) does not work?

    Hello everybody,

    I'm a C programming beginner
    I was asking myself why this code (it compiles properly) prints only zeros


    #include <stdio.h>

    int main()
    {
  15. Replies
    2
    Views
    771

    printf, % and %f

    hello everybody, it's the first time I post!

    I've started learning C with Deitel & Deitel: one of the first exercises sound like...



    #include <stdio.h>

    int main()
    {
Results 1 to 15 of 15