Answer Posted / namita
1-memory allocated by malloc contains garbage value.But
memory allocated by calloc is initialised to zero.
2-malloc takes only one argument which indicates the size
to be allocated.But calloc takes two arguments.First
argument indicates the number of blocks to be allocated
where as the second argument indicates the size of the
block.
Is This Answer Correct ? | 35 Yes | 2 No |
Post New Answer View All Answers
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
Why we use int main and void main?
Is c procedural or functional?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
What is bubble sort in c?
How do you construct an increment statement or decrement statement in C?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
What is an lvalue in c?
What is meant by initialization and how we initialize a variable?
How can I ensure that integer arithmetic doesnt overflow?
What is the difference between new and malloc functions?
application areas a 'c' a) operating system b) graphics, interpreter, assembler c) program evalution, communication softwares d) all the above
what is bit rate & baud rate? plz give wave forms
Write programs for String Reversal & Palindrome check
How can I manipulate strings of multibyte characters?