what is the defrenece between structure and union
Answer Posted / shruti
Kapildalke -> u are rite..
the differance between a structure and union is that,
in structure memory is allocated to each and every element
of the structure.
in union memory allocated is only of the element which
requires maximum memory.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the Advantages of using macro
Explain how can I avoid the abort, retry, fail messages?
What math functions are available for integers? For floating point?
Why & is used in scanf in c?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
Can math operations be performed on a void pointer?
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What is meant by int main ()?
What should malloc() do?
How do you declare a variable that will hold string values?
What is integer constants?
the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters
Explain the use of fflush() function?
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