C



Totel:207 Click: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
C Interview Questions And Answers

Page 1

Programming language

Programming language

Programming language

Programming language

Programming language

Programming language

Programming language

Programming language

0

0

0

0

0

0

0

0

0

Some important distance between calloc and malloc are given below:
 
malloc:
 
malloc takes only the "size" of the memory block to be allocated as input parameter.
malloc allocates memory as a single contiguous block.
if  a single contiguous block cannot be allocated then malloc would fail.

calloc:

calloc takes two parameters: the number of memory blocks and the size of each block of memory
calloc allocates memory which may/may not be contiguous.
all the memory blocks are initialized to 0.
it follows from point 2 that, calloc will not fail if memory can beallocated in non-contiguous blocks when a single contiguous blockcannot be allocated.

Some important distance between calloc and malloc are given below:
 
malloc:
 
malloc takes only the "size" of the memory block to be allocated as input parameter.
malloc allocates memory as a single contiguous block.
if  a single contiguous block cannot be allocated then malloc would fail.

calloc:

calloc takes two parameters: the number of memory blocks and the size of each block of memory
calloc allocates memory which may/may not be contiguous.
all the memory blocks are initialized to 0.
it follows from point 2 that, calloc will not fail if memory can beallocated in non-contiguous blocks when a single contiguous blockcannot be allocated.

the printf() function is supposed to print the output to stdout.In sprintf() function we store the formatted o/p on a string buffer.

the printf() function is supposed to print the output to stdout.In sprintf() function we store the formatted o/p on a string buffer.

the printf() function is supposed to print the output to stdout.In sprintf() function we store the formatted o/p on a string buffer.

Do not include unnecessary header files and 
Do not link with unneccesary object files.

  

Use dynamic linking. 


Goto Page:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
C Objective Questions And Answers

C Objective Questions And Answers

C Interview Questions And Answers

C Interview Questions And Answers


R4R,C Objective fresher and experienced, C Subjective fresher and experienced ,C Interview Questions And Answers,C fresher and experienced,C Interview fresher and experienced ,C Questions fresher and experienced,C Answers fresher and experienced