First
First
Basic libraries in C:
headers:
stdin.h >>> standard input ouput
main:
in C language main function is the function called when running the program
data Types:
prmitive:
int 32 bit 4byte
long 64 bit 8 byte
char 8 bit 1 byte
bool (needs <stdbool.h>
double (64 bit percision)
float (32 bit)
structure:
array: in C array uses the curely braces {} for initialising the array
pointers:
1-stores address of variables of same type
int a =10;
int *b = &a;
struct:
structs enable you to create your own data type
imagine you want to create a cat data type( similar to objects in
other languages)
typdef struct {
char *color;
char *name;
int age;
}cat ;
modified:
short int -32768 -> 32768
unsigned short 0 -> 65635