Originally posted by tejas15_10
hi to all
i have some problem with my code..when i compile my code its not giving me any error but when i run the application it gives the error "segmentation fault"...i checked the code and still i m not assigning a heavy memory to the code..but dont knw wht is the problem...
plz reply me abt the segmentation error..how to remove it from the code??or any tactics for that...its very urgent for me...
thanx for reading my thread and possibly then reply....
i just hate to see this term "segmentation error". I always get it when i run my c programs
1) you tried to use a pointer that was not allocated using malloc or calloc
2) you are trying to access a pointer that has been freed
3) you are trying to access an array element that does not exist
4) you use a fileopen function but it fails to open the file and then you try to write/read from the file thinking the open function was successful
these are a few but not all the causes. The best way is to use gdb and backtrace