Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is segmentation fault?

Answer Posted / vinaymb

Consider an example

#include "stdio.h"
main ()
{
char *ptr = "BANGLAORE";
*ptr = "b";
}

This Program will compile without any error. But on running
this program you will get the Segmentation error. Because
the ptr will hold the address which is read-only and we are
changing the value at the read-only which will result in
segmentation fault.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain process management system calls in linux?

1055


what are different ways the context switch happens from user to kernel space or vice-versa ?

2639


I would like to know whether Simado and Setu products are they EPBX or not ?

2365


What are system calls used for process management in linux?

1110