That's what I'm getting it but there will be a sleep() within the while loop so it won't exactly end at the endtime depending on the sleep argument.
I'll just do it the way I thought of.
...
Type: Posts; User: SeriousTyro
That's what I'm getting it but there will be a sleep() within the while loop so it won't exactly end at the endtime depending on the sleep argument.
I'll just do it the way I thought of.
...
The user will enter the number of milliseconds between each packet generated. My program will essentially sleep for that specified time then return to the loop.
I could use gettimeofday() to...
I know there is a sleep() function that lets you "idle" the program for a specified length of time but I was wondering if there was a function that lets you run the program for a specified length of...
Thanks a lot PehJota!
I was getting to the point of having meaningless short ops for my long options but having them as numbers works the same way.
The reason why I had so many colons for my...
Haven't done much C programming before so I've been looking at examples and forming my program around them.
I was wondering how to store a long option's argument that has no short option?
e.g....
AHHH that's so true!!! When I first thought u could only get one line at a time, I thought i would have to break up each line but with fgetc it gets the job done. yea my way was pretty bleh... Your...
wow i'm so stupid, i completely forgot u could get a single char at a time. i was thinking you could only read one line at a time!! i completely forgot !!! argh!!! i feel so stupid!!!!
yea, i got that down but is there no way to combine multiple 1D arrays into one giant 1D array? i could do it manually with a for loop but maybe i'm just trying to find an easy way out. guess i'll...
i'm trying to Find the greatest product of five consecutive digits in the 1000-digit number. so i'll be looking at each index and doing this with a 1D array is easier. I'll use the 2D array if that's...
i know i could use a two dimensional array but if i could somehow combine it all into one big array it would be so much easier for me.
i have a file that contains one thousand numbers
73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843...
Awesome, know I shouldn't really post on a thread that's like a week old but need to say thanks. strlen() is what I'm talking about. Reason I didn't use it was because i didn't know about it.
...
Awesome, thanks for the help. I finished my program that lists all the pairs of prime numbers whose sum equals the number entered by the user .
just wondering on the memset
#include...
yea that seems to be the problem when i did something like
int array[5]={0}
it would work but when i did something like
int arraysize=5;
int array[arraysize]={0}
i would get that error...
normally in a 1D array it would be something like
int array[5]={0}
and that would initialize all the values to 0 but when i try something like
int array[5][5] = {0}
i get an error that says...
char *str = "The quick brown fox jumped over the lazy dogs.";
char *p;
p = strstr(str, "lazy");
printf("%s\n", p); // "lazy dogs."
// p is NULL after this, since the string "wombat" isn't in...
Objective: Create a simple Palindrome checker program. The program should allow the user to enter a string and check whether the given string is a palindrome or not.
My programming level is quite...