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 |
Explain what standard functions are available to manipulate strings?
1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?
Can i use “int” data type to store the value 32768? Why?
What is calloc()?
Explain the difference between null pointer and void pointer.
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What is array in c with example?
Explain union. What are its advantages?
how can i include my own .h file EX:- alex.h like #include<alex.h>, rather than #include"alex.h"
Can an array be an Ivalue?
how to write a c program to print list of fruits in alpabetical order?
Do string constants represent numerical values?