what is the difference between malloc() and calloc() function?
Answer / amritha rose
malloc will allocate memory according to the size we
specified
calloc vil allocate memory as blockwise
and initialize by 0
| Is This Answer Correct ? | 9 Yes | 1 No |
Write a program to print factorial of given number using recursion?
String concatenation
What's wrong with the call "fopen ("c:\newdir\file.dat", "r")"?
if the address of a[1,1] and a[2,1] are 1000 and 1010 respectively and each occupies 2 bytes then the array has been stored in what order?
4 Answers Amazon, Apple, Bata, Google, NASA,
Explain what is the benefit of using enum to declare a constant?
write a proram to reverse the string using switch case?
What is the purpose of scanf() and printf() functions?
Is using exit() the same as using return?
wap in c to accept a number display the total count of digit
You have an int array with n elements and a structure with three int members. ie struct No { unsigned int no1; unsigned int no2; unsigned int no3; }; Point1.Lets say 1 byte in the array element is represented like this - 1st 3 bits from LSB is one number, next 2 bits are 2nd no and last 3 bits are 3rd no. Now write a function, struct No* ExtractNos(unsigned int *, int count) which extracts each byte from array and converts LSByte in the order mentioned in point1.and save it the structure no1, no2, no3. in the function struct No* ExtractNos(unsigned int *, int count), first parameter points to the base address of array and second parameter says the no of elements in the array. For example: if your array LSB is Hex F7 then result no1 = 7, no2 = 2, no3 = 7. In the same way convert all the elements from the array and save the result in array of structure.
Is main is a keyword in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;