what are brk, sbrk?
Answer / guest
These are the system calles used to allocate the memory.
brk will call internally when u call malloc func.
Is This Answer Correct ? | 4 Yes | 1 No |
what will be the output: main(){char ch;int a=10;printf("%d",ch);}
36 Answers Accenture, TCS, Wipro,
what is pointer ? what is the use of pointer?
How can I read a directory in a C program?
2 Answers Bright Outdoor, Wipro,
1,1,5,17,61,217,?,?.
what are the static variables
8 Answers HCL, iFlex, TCS, Wipro,
what are far pointers?
code for quick sort?
Write a C program to find the smallest of three integers, without using any of the comparision operators.
Why doesn't C have nested functions?
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.
we have to use realloc only after malloc or calloc ? or we can use initially with out depending on whether we are using malloc or calloc in our program ?
Explain is it better to bitshift a value than to multiply by 2?