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 |
Write the Program to reverse a string using pointers.
What is the difference between %d and %i?
How does C++ help with the tradeoff of safety vs. usability?
Is main() is used in the program,,see below example? void main() { int i; for(i=0;i<10;i++) main(); } Then what is the output of the program?
ratio,age,persentage
what is op? for(c=0;c=1000;c++) printf("%c",c);
write an interactive program to generate the divisors of a given integer.
Why cann't whole array can be passed to function as value.
What is the difference between a free-standing and a hosted environment?
What is struct node in c?
In header files whether functions are declared or defined?
How can I do graphics in c?