What's wrong with "char *p; *p = malloc(10);"?
Answers were Sorted based on User's Feedback
Answer / 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 |
If the static variable is declared as global, will it be same as extern?
The file stdio.h, what does it contain?
main difference between c and c++ language
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
How to swap 3 numbers without using 4th variable?
What is c language & why it is used?
which will return integer? a) int*s ( ) b) ( int* ) s( ) c) int ( *s ) ( )
What is break in c?
Write a simple program to find the size of different basic data types in C.
Explain with the aid of an example why arrays of structures don’t provide an efficient representation when it comes to adding and deleting records internal to the array.
How does placing some code lines between the comment symbol help in debugging the code?
What does dm mean sexually?