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 does c mean in standard form?

1185


Explain the process of converting a Tree into a Binary Tree.

2670


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1885


What is build process in c?

1160


How to declare pointer variables?

1245


How can you check to see whether a symbol is defined?

1104


regarding pointers concept

2041


When c language was developed?

1062


What is wrong with this declaration?

1109


How to write a code for reverse of string without using string functions?

2147


What is pointers in c with example?

1078


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2201


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1232


Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.

1108


Write a program to print ASCII code for a given digit.

1095