Typedef

Q1:
typedef's have the advantage that they obey scope rules, that is they can be declared local to a function or a block whereas #define's always have a global effect.

A Yes

B No

ANS:A - Yes

For eg.,

{
typedef char c;
c c1;//c is char
{
typedef int c;
c d1;//c is int
}
}

But #define always has global scope till the end of the file.  



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.