
Originally Posted by
garupede
Ei man,
in 2 days I will have the C exam at the university and I've been studing this language for a while actually.
If you are just starting your studies I suggest you to begin with the bases: I'd say that you might start with cicles " for() ", while() " ( obviously to do it you have to know the very bases ). The pointers are very important; you will need to use them when you will learn functions and procedures ( void ): in particular you will use the pointers ( which can be of many types --> int *f, char *c, float *b etc ) when you have to update the value of a variable inside a function/procedure. Mind that arrays ( an other essential component of C ) will never requires the " * " because they are always passed are pointers ( char s[20], in a procedure, will be changed automatically, you don't have to pass char *s[20] ) --> in particular C considers an array with his first cell (char s[0] = char *s). Consequently you have to learn the structures because they allow you to recognise groups of elements which could have similar features.
Actually there are undreds of things to learn, everyone might be consider as a beginner ( or naat?! );
if you need an help or some real examples you can contact me.
Regards 
Ehhh i need help
What is initial ?
And how this works ?
number_of_pencils*pencils
+ number_of_notebooks*notebooks + lunchbox
Here is my code
// Example program #1 from Chapter 5 of Absolute Beginners Guide
// to C, 3rd Edition
// File Chapter5ex1.c
/* This is a sample program that list three kids and their school
supply needs, as well as cost to buy the supplies */
#include <stdio.h>
main()
{
// Set up the variables, as well as define a few
char firstInitial, middleInitial;
int number_of_pencils;
int number_of_notebooks;
float pencils = 0.23;
float notebooks = 2.89;
float lunchbox = 4.99;
//The information for the first child
firstInitial = 'J';
middleInitial = 'R';
number_of_pencils = 7;
number_of_notebooks= 4;
printf("%c%c needs %d pencils, %d notebooks, and 1 lunchbox\n",
firstInitial, middleInitial, number_of_pencils,
number_of_notebooks);
printf("The total cost is $%.2f\n\n", number_of_pencils*pencils
+ number_of_notebooks*notebooks + lunchbox);
//The information for the second child
firstInitial = 'A';
middleInitial = 'J';
number_of_pencils = 10;
number_of_notebooks= 3;
printf("%c%c needs %d pencils, %d notebooks, and 1 lunchbox\n",
firstInitial, middleInitial, number_of_pencils,
number_of_notebooks);
printf("The total cost is $%.2f\n\n", number_of_pencils*pencils
+ number_of_notebooks*notebooks + lunchbox);
number_of_pencils = 10;
number_of_notebooks= 3;
printf("%c%c needs %d pencils, %d notebooks, and 1 lunchbox\n",
firstInitial, middleInitial, number_of_pencils,
number_of_notebooks);
printf("The total cost is $%.2f\n\n", number_of_pencils*pencils
+ number_of_notebooks*notebooks + lunchbox);
//The information for the third child
firstInitial = 'M';
middleInitial = 'T';
number_of_pencils = 9;
number_of_notebooks= 2;
printf("%c%c needs %d pencils, %d notebooks, and 1 lunchbox\n",
firstInitial, middleInitial, number_of_pencils,
number_of_notebooks);
printf("The total cost is $%.2f\n\n", number_of_pencils*pencils
+ number_of_notebooks*notebooks + lunchbox);
return 0;
}