What will happen when freeing memory twice
Answers were Sorted based on User's Feedback
Answer / veeresh
Memory is the very valuable, if we leave memory freely then
memory will be wasted and cant be used.
| Is This Answer Correct ? | 0 Yes | 3 No |
What is the purpose of the fflush() function in C?
You have given 2 array. You need to find whether they will create the same BST or not. For example: Array1:10 5 20 15 30 Array2:10 20 15 30 5 Result: True Array1:10 5 20 15 30 Array2:10 15 20 30 5 Result: False One Approach is Pretty Clear by creating BST O(nlogn) then checking two tree for identical O(N) overall O(nlogn) ..we need there exist O(N) Time & O(1) Space also without extra space .Algorithm ?? DevoCoder guest Posted 3 months ago # #define true 1 #define false 0 int check(int a1[],int a2[],int n1,int n2) { int i; //n1 size of array a1[] and n2 size of a2[] if(n1!=n2) return false; //n1 and n2 must be same for(i=0;i<n1-1;i++) { if( !( (a1[i]>a1[i+1]) && (a2[i]>a2[i+1]) ) ) return false; } return true;//assumed that each array doesn't contain duplicate elements in themshelves }
What is the scope of global variable in c?
What is the difference between abs() and fabs() functions?
Write a program to print prime nums from 1-20 using c programing?
write a c prog for removing duplicate character from an array and sorting remaining elements using a single array
What is sizeof return in c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
What is typedef struct in c?
I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.
What is the most efficient way to store flag values?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?