WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c
file management?
Answer Posted / prakashdasari
malloc () for allocating the single block of memory
calloc () for allocating multiple blocks of memory
the values assigned are garbage in case of malloc() and
proper values (zeros) are assigned in case of calloc().
| Is This Answer Correct ? | 114 Yes | 34 No |
Post New Answer View All Answers
What are valid signatures for the Main function?
Why static is used in c?
If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402
What are types of preprocessor in c?
How to implement a packet in C
What are the 4 data types?
What are the different types of C instructions?
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
What is declaration and definition in c?
I have a varargs function which accepts a float parameter?
What is the scope of an external variable in c?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
Difference between macros and inline functions? Can a function be forced as inline?
Compare interpreters and compilers.
When can a far pointer be used?