17 October 2017

Important features and of C programming language


  1. Function prototype declaration. Like declaring a variable in java, you can also declare a function. It is useful if you are going to call the function before the definition of the function. 
  2. C has pointer operator.
  3. C doesn't have a string data type. Instead we can use char array. 
  4. Structure is a custom data type. It's kind of an "object".
  5. "%lf" to format double
  6. "%.2f" to format float with 2 digit after a comma. 
  7. "%d" to format an integer. 
  8.  Store only positiv integer value: unsigned int a;
  9. int A[4], printf("%d\n", A); will return the base address (Address of first element)
  10. int A[4]; A[0] = 3;  printf("%d\n", A*); will return the value of the first element.
  11. Casting an Array to a pointer, now you can access the element without brackets