Monday, 16 June 2014

Basics for embedded systems

Basics for embedded systems:

C program:

Structure of C program:
  • include files
  • global variables and function declaration
  • main function
  • function and program.
Including files are including the preprocessed files like;eg:#include<stdio.h>,#include<conio.h>.
Global variables are those variables declared globally in the sense before a main function.After the main fuction the program consists of sub programs.

There are keywords used for performing specific operation.
eg:auto,break,case,double,int,char,const,signed,unsigned,void,etc;..

Data types:
  1. Primary/primitive data types:
  • Integer
  • char
  • float
  • void
   2.   Derived data types:
  • Array
  • pointer
   3.   User defined data types:
  • structure
  • union
  • enum
  • type def
Variable:
type            size
char           1byte
int              2bytes
float           4bytes
double        8bytes

There are also modifiers,compilers,constants,operators,relational operators,statements,break statements,switch and case statements any many more.


No comments: