Languages [TCS Placement]: Sample Questions 13 - 15 of 131
Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.
Question 13
Explanation
- Reserved words are that are part of the standard C language library.
- Reserved words have special meaning and cannot be used for purposes other than what they are originally intended.
- Examples of reserved words are int, void, and return.
Question 14
Explanation
- The use of an enumeration constant (enum) has many advantages over using the traditional symbolic constant style of #define.
- These advantages include a lower maintenance requirement, improved program readability, and better debugging capability.
- Enumerated constants are generated automatically by the compiler. Conversely, symbolic constants must be manually assigned values by the programmer.
- Enumeration constant makes programs more readable and thus can be understood better.
Question 15
Write in Short Short Answer▾
Which bit wise operator is suitable for checking whether a particular bit is on or off?
EditExplanation
The bitwise AND operator. Here is an example:
enum
{
KBit0 =1,KBit1,…..…KBit31,
};if ( some_int & KBit24 )printf (“Bit number 24 is ON”);elseprintf (“Bit number 24 is OFF”);