YouTube: C Programming Tutorials step-by-step

C Programming Tutorial 2: Introduction to Variables

  • printf, Escape character \n
  • printf("The sum is %d", sum);
  • scanf("%d", &num1);  
    • scanf always use & for variable; printf does NOT.
  • sum = num1 + num2;


C Programming Tutorial 3: Arithmetic Operations

  • Basic concept of function such as void main (void)
  • block concept: open brace and closing brace come in pair
    {       
          printf("Hello World");
    }    
  • Comments
  • Arithmetic operations: value = 6 + 4 * 10


C Programming Tutorial 4: If Statement Decision

If (num1 == num2)
{
    printf(“they are equal”);
}


C Programming Tutorial 5: If, Else If, Else Statements

If (age==60)
{
     printf(“easy cougar!”);
}
else if (age==40)
{
     printf(“mom?”);
}


Click HERE to read all articles on C Programming


Post a Comment

0 Comments