I used the K&R book since this Januaray, and it was very hard to understand at first....I still have troubles understanding some of the concepts....I need more practice.
Type: Posts; User: dredre
I used the K&R book since this Januaray, and it was very hard to understand at first....I still have troubles understanding some of the concepts....I need more practice.
yeah, but how is it worked out ?
for example,
printf("*s++ = %d\n", *s++);
(*s)++ it increments the pointer, but i can't really see how the output is 0
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *a, *s, i;
s = a = (int *) malloc(4 * sizeof(int));
for(i = 0; i < 4; i++)
maybe use qsort() to sort the numbers first in ascending order, then grab the first 10 elements of the sorted array.
in this situation, I think that the atoi() function could be useful (someone correct me if i'm wrong)
If your text file contains numbers, atoi() lets you convert them to integer format for use in...
that's a huge if statement. Try using switch()
This site helped me out with basic C programming. Give it a try :)
Damn, if i would of joined sooner, my previous assignment would of been so much easier.
That's exactley what we had to check for in the command line.
btw, thanks for the quick response
This is an assignment problem. It uses dynamic memory & the qsort function in the standard C library. The program is called csort
Anyways, I dont understand this detail:
it says "csort must be...