Arrays and pointer are closely related in C. But first tell me what book are you using?
Anyways, one advice: your scripting languages like Python and Perl makes you feel that programming is fun, this is not the case with C. I am sure you will have to do quite low level things in C. Know that C is statically typed.
If you are just beginning to C, don't use the above said solution. It will tend to confuse you.
You must know that you must explicitly state the size of an array which should be a CONSTANT. Thats the most important luxury you miss when coming from perl. In C we have fixed sized array. ( we too have hacks for dynamically sized array but that would be covered later).
So, the solution would seem like this:
#include <stdio.h>
/*The maximum prime that the Program supports*/
#define MAXPRIMES 100
int main() {
int max;
int count = 1;
int value = 1;
/*note below, here I passed a constant value,100 as size*/
int primes[MAXPRIMES];
int composite;
int i = 1;
int j;
/*I warned the user that maximum primes supported by this program*/
printf ("How many primes?(Maximum %i)",MAXPRIMES);
scanf ("%d", &max);
/*I am too tired to check your progarm logic.
As you are a programmer, SHould I trust you?
Anyways, if you can make it run, get us back*/
printf ("2 is prime\n");
primes[0] = 2;
while (count < maxprimes){
composite = 0;
value …