#1. 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.
No
#2. Choose the correct conditional operators in C – a) :, b) ~, c) ?, d) ++
abcd
ac
bc
cda
#3. Which of the following statements should be used to obtain a remainder after dividing 4.14 by 3.1 ?
rem = 4.14 % 3.1;
rem = modf(4.14, 3.1);
rem = fmod(4.14, 3.1);
Remainder cannot be obtain in floating point division.
#4. Which of the following correctly shows the hierarchy of arithmetic operations in C?
/ + * -
* - / +
+ - / *
/ * + -
#5. A function cannot be defined inside another function
True
False
#6. What is (void*)0?
Representation of NULL pointer
Representation of void pointer
Error
None of above
#7. Can static procedures access instance data?
Yes
No
#8. What is the similarity between a structure, union and enumeration?
All of them let you define new pointers
All of them let you define new values
All of them let you define new data types
All of them let you define new structures
#9. Which of the following is not a valid relational operator?