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's wrong with "char *p; *p = malloc(10);"?

Answer Posted / clay

Here,

After char *p;
since pointer p is not initialized it is pointing at some
unknown location.

In the next step, the address of the memory allocated by
malloc() is stored at some garbage location pointed by p.

Here p is never initialized or never assigned any value.

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is output redirection?

1175


Explain what is the difference between a free-standing and a hosted environment?

1135


Compare array data type to pointer data type

978


Why is C language being considered a middle level language?

1061


List the variables are used for writing doubly linked list program.

1973


Who is the founder of c language?

1123


What are categories used for in c?

1045


Where does the name "C" come from, anyway?

1091


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1021


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2379


Is return a keyword in c?

1039


Can we initialize extern variable in c?

1087


What are lookup tables in c?

958


Whats s or c mean?

963


can anyone please tell about the nested interrupts?

2076