loops

For loop syntax: for (i=0;i<5;i++)                  – don’t end line with a ‘;’ {             Runs 5 times. }   While loop syntax: while(i<5)                             – don’t end line with a ‘;’ […]

Read Article →

Scanf

When using scanf: For integers:            scanf(“%d”,& variablename); For characters:       scanf(“%c”, & variablename); For floats:                 scanf(“%f”,& variablename); For strings:               scanf(“%s”, variablename);   NOTES: Don’t use ‘&’ when storing strings. Don’t […]

Read Article →