oh thanks Tater, I didn't even see your post until I was done, it would have saved me a lot of research! But thanks anyways!
Type: Posts; User: KrazySocoKid
oh thanks Tater, I didn't even see your post until I was done, it would have saved me a lot of research! But thanks anyways!
K guys it works now! Thanks! Here is the finished code.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main ()
{
int i;
I have created a random number generator using this code.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main ()
{
int i;
Sweet! Everything works! I got all the memory leaks caught too! Thanks a lot!
and yes I am aware of the memory leaks so far in this program. I was going to work on freeing up all the memory after I get this little snag done
For those who do not know what the Collatz Conjecture is:
Collatz conjecture - Wikipedia, the free encyclopedia
Ok so my program works pretty well. There are 2 menu choices. You can either just see...
Thanks!
Okay it works...sort of.
Here's the whole code. It's printing out the last ten prime numbers like I want it to, but for some reason, I'm getting a random segmentation fault at the end of the...
Here is the original array version. I am trying to make this into a pointer version. No array indexing allowed
#include <stdio.h>
#define MAX 1000
int sieve(int d[])
{
int i;
for...
I made the array version of this program and it worked. So now I have to make a pointer version. But whenever I compile, it seems like the compiler is not recognizing when I dereference the pointer....
I'm sorry I have no idea why my code is posting sideways
#include #include char * point(char s[]) { int i; char *s_pointer; for (i = 0; s[i] != isspace(*(s_pointer)); i++) { s_pointer = &s[i]; } return s_pointer; } int main() { char s[] = "...
The isspace() function is not in the stdio.h library right? Which library is it in?
Here is my current code
#include <stdio.h>
//This adds one string to the end of another
//Input: You need two pointers to two different strings
//Output: It doesn't return anything....
Ok I created an integer
int k = i +j;
I put it after the 2nd while loop. But I still don't know how to add it to the string.
Once again, I need a push in the right direction.
The problem is to make a pointer program that copies one string onto the end of the other. I did this and it works perfectly. However, the 2nd part...
When I run the program I'm getting the output as r. It should be F? Any idea what's going on?
Thank you very much!
I'm not asking anybody to write the program. All I need is a poke in the right direction or some hints. I'm so lost, I don't know if I'm even in the right ballpark right now. Here is the question:
...