Struct(s)
{
int a;
long b;
}
Union (u)
{int a;
long b;
}
Print sizeof(s)and sizeof(u) if sizeof(int)=4 and
sizeof(long)=4
Answer Posted / vikraman85
Size fo strucure wil be the total bytes of the datatypes
inside it..
so,4+4=8;
For unions the size wi be the size of the datatype whose
memory is high,.
so,its 4,.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
How do you use a 'Local Block'?
What are the features of the c language?
What is the use of extern in c?
Where are some collections of useful code fragments and examples?
What are structure types in C?
How pointer is different from array?
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
Can we initialize extern variable in c?
Here is a good puzzle: how do you write a program which produces its own source code as output?
How do you define a function?
What is the difference between int main and void main?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
how should functions be apportioned among source files?
What is the right type to use for boolean values in c? Is there a standard type?
What is c programming structure?