eidalina20
March 7th, 2008, 10:25 AM
Hi everyone.. can someone please help me to answer these questions... i am new to C and trying to understand the technique.
1.
k so what if you are given a code segmant like this:
{ int i, j;
{ int a, b, c;
{ int i;
}
}
{ int a, j, k;
{ int i, j, b;
}
}
{ int i, j;
}
}
Assuming that a integer occupies 4 bytes, what is the minimum number of bytes which could be used to accomodate all the integers declared in the above fragment.
2.
The Gnu C Compiler (gcc) allows labels as values as a language-extension:
http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
But the documentation says:
You may not use this mechanism to jump to code in a different function. If you do that, totally unpredictable things will happen.
please can someone discuss the possible reasons for this restriction... i never used gcc.
thanks everyone
1.
k so what if you are given a code segmant like this:
{ int i, j;
{ int a, b, c;
{ int i;
}
}
{ int a, j, k;
{ int i, j, b;
}
}
{ int i, j;
}
}
Assuming that a integer occupies 4 bytes, what is the minimum number of bytes which could be used to accomodate all the integers declared in the above fragment.
2.
The Gnu C Compiler (gcc) allows labels as values as a language-extension:
http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
But the documentation says:
You may not use this mechanism to jump to code in a different function. If you do that, totally unpredictable things will happen.
please can someone discuss the possible reasons for this restriction... i never used gcc.
thanks everyone