Hi
Sorry for such a trivial question (this has to come up in the first semester of any comp-sci course), but I need to sort a string of numbers, no longer than 32 digits each, in "dictionary...
Type: Posts; User: advancedk
Hi
Sorry for such a trivial question (this has to come up in the first semester of any comp-sci course), but I need to sort a string of numbers, no longer than 32 digits each, in "dictionary...
Hi
I've been writing some C programs with the scanf funciton and wondered if there was an easier way to input data. I need functions which can:
1. Identify set areas in strings (e.g. is the...
Hi
I'm doing question 2 from http://olympiad.org.uk/papers/2006/bio/bio06-exam.pdf (Out of personal interest)
How can I write a program that can handle the brackets? I suppose a more general...
Ok . . . I'm learning to program in C. I've been reading books/articles which have mentioned the "stack" or "call stack". However, I have no idea what a stack is. . . . wikipedia is too...
Hi
I haven't connected much hardware to my PC before, so I thought it would be interesting to do so. I want to use my parallel port to input and output data, possibly doing something like this:
...
Hi
I have written a C program that is supposed to run in under 2 seconds. Is there a function in C that lets me time how long it takes to run the program?
Thanks
Hi
I have visual studio 2005 and have been writing C code in it. However, I have done this in a rather round-about way. I created an empty c++ project, added a .cpp code file, wrote normal C into...
Hi
I was wondering whether it was easy in C to write a program to take advantage of two cpu cores.
For example, if I wanted to make a program that found out what every number from 0-100 dived...
Hmm - I like tabstop's idea
I don't get why you changed 567 to 456 - "the original four was thrown away, and five became four, six became five, and seven became six"? Without doing this I get the...
Yes but I only want to have an array 5040 ints long and I don't want to have to serach through the array each time to find the sequqnce I am looking for.
It's easy to store the sequences in a 5040...
Hi
I have the numbers 1,2,3,4,5,6 and 7 and can arrange them in any order. Thus there are 7! ways to do this meaning 5040 possibilites.
I have a program that works out whether to assign a 1 or...
Hi
I have the code
printf("Enter the characters:\n");
char enc_numbers[10]; //Read in characters
gets(enc_numbers);
Hi
I made a program to answer question 1 from this paper
http://www.olympiad.org.uk/papers/2008/bio/round_one.html
I used a "sieve of eratosthenes". Just wondering if there was anything that...
Cool
So when you have
*(int *)
at the beginning of the code what is the (int*) bit doing? Does the * bit at the very biginning just mean "print out the value at the memory location...
I have the code
int k = 2;
int a[10];
int b = 0;
for(b=0;b<10;b++)
{