Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #3K
~3K People Reached
Favorite Forums
Favorite Tags

7 Posted Topics

Member Avatar for purepecha

rewrite your evenOdd() function [code=c] void evenOdd(int *ptr){ int arr[N], i; int j; /*for keeping track of the index for arr*/ int*tmp; j=0; tmp=ptr; for(i = 0; i < N; ++i, tmp++){ if (*tmp %2==0) { arr[j]=*tmp; j++; } } tmp=ptr; for(i = 0; i < N; ++i, tmp++){ if …

Member Avatar for arkoenig
-1
1K
Member Avatar for wasge

I presume your functions arte wanting a pointer argument try prefixing your array argument with &

Member Avatar for wasge
0
201
Member Avatar for amegahed3

You can try using this to get a line from a file, and strip leading and trailing blanks, CR's etc and detect the EOF condition RETURNS: TRUE if EOF or file error has occurred FALSE if not EOF Note: typedef char * PSZ #define MAX_LINE_LEN to whatever value you like …

Member Avatar for jephthah
0
282
Member Avatar for turbomen

[code=c] #include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #define MAX_NUM 40 #define NUM_LOTTO_BALLS 6 #define NUM_POWER_BALLS 8 void Rsleep( float period ) { int seconds, useconds; double TimeNow; struct timeval tvCurrent; seconds = itrunc(period); useconds = (period - seconds) * 1000000; gettimeofday(&tvCurrent, NULL); TimeNow = tvCurrent.tv_sec + …

Member Avatar for IVR_Developer
0
289
Member Avatar for IVR_Developer

Hi from New Zealand. I have been programming in C for the last 19 years. My true love is OO which I studied at university, but I have ended up in a C job (where the most annoying bugs are possible) with UNIX shell scripting and a proprietory ASM language …

0
47
Member Avatar for stickboy

there is some compilation problems when moving a car. But that is simply typos. e.g carstpr should be carsptr You should not start at the beginning of the list on every iteration should you?. I did this. [code=c] /*--move a car if it is in the same spot as another--*/ …

Member Avatar for IVR_Developer
0
101
Member Avatar for jmeson79

Several problems here fgets() returns the line feed character into its argument, so you must overwrite it if you want to compare you should use strstr() and not strcmp() since you are comparing whole lines read from your files here is a working solution [code=c] #include <stdio.h> #include <string.h> int …

Member Avatar for IVR_Developer
0
107

The End.