What is a memory leak? How to avoid it?
Memory leak occurs when programmers create a memory in heap and forget to delete it. ... To avoid memory leaks, memory allocated on heap should always be freed when no longer needed.
| Is This Answer Correct ? | 0 Yes | 0 No |
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
6)What would be the output? main() { int u=1,v=3; pf("%d%d",u,v); funct1(&u,&v); pf("%d%d\n",u,v); } void funct1(int *pu, int *pv) { *pu=0; *pv=0; return; } a)1 3 1 3 b)1 3 1 1 c)1 3 0 0 d)1 1 1 1 e) 3 1 3 1
write a program to print data of 5 five students with structures?
WAP to convert text into its ASCII Code and also write a function to decode the text given?
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.
How can a process change an environment variable in its caller?
compare array with pointer?
What are the different flags in C? And how they are useful? And give example for each in different consequences?
what is the advantage of using SEMAPHORES to ORDINARY VARIABLES???
How can I call fortran?
What is variable in c example?
input any 4 digit number and find the difference of all the digits?