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...
Type: Posts; User: lbraglia
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...
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...
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...
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...
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...
what a blindness !! :)
"=" --> ">="
$: ./a.out
Enter two integers: 12 8
mcd beetween 12 and 8 is 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?
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...
Ok, it works! :)
thank you again
mmm, maybe I didn't understand something ... this's my new code
#include <stdio.h>
#include <math.h>
int main(void)
{
Why?
#include <stdio.h>
#include <math.h>
int main(void)
{
well, since "we" are programmers (it would be better to say "you...") :)
#include <stdio.h>
int main()
{
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
+++...
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()
{
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()
{