Answer Posted / guest
malloc returns a void pointer. It needs to be cast to char*
before allocating it to char* variable.
char *p = (char *)malloc(10); should do fine.
Is This Answer Correct ? | 26 Yes | 2 No |
Post New Answer View All Answers
What are types of structure?
What is the difference between declaring a variable and defining a variable?
Explain setjmp()?
What are the disadvantages of external storage class?
using for loop sum 2 number of any 4 digit number in c language
What is difference between stdio h and conio h?
differentiate built-in functions and user – defined functions.
Explain how do you determine the length of a string value that was stored in a variable?
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.
What is the right type to use for boolean values in c?
Explain the properties of union.
Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
What’s the special use of UNIONS?
I need previous papers of CSC.......plz help out by posting them.......