Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

HOW TO BECOME PROFICIENT IN C

Name: Anonymous 2011-04-15 17:42

So I claimed I was proficient in a number of languages on my resume, all of which I've barely used.

I think I can get away with some of it but I really think I need to know how to use C and Python well for the job. He said the job might require C# which is close enough to core C.

How do I become proficient with these languages in a week or so?

Name: Anonymous 2011-04-17 19:55

Not OP but I don't want to make a new thread for this.
What's wrong with

#include <stdio.h>

int sum(int* x, int i);

int main() {
  int i = 0;
  int* v;

  v = malloc(sizeof(int) * 4);
 
  do {
    printf("Element %d: ", i); scanf("%d", &v[i]);
    i++;
    if(i%4==0) v = malloc(sizeof(int) * (i+4));

  }while(v[i-1] > 0);

  int s = sum(v, i-1);
  printf("Sum: %d\n", s);
  return(0); }

int sum(int x[], int n) {
  int s = 0;
  int i;
  for(i = 0; i < n; i++) {
    s += x[i];
  }
  return(s);
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List