C Programming Interview Questions and Answers-5

Q: – How do you remove a macro name?
By using the #undef directive with a macro name, that macro name can be removed, or “undefined.”
Q: – Why do you need the #endif directive?
The #endif directive is used with an #if, #ifdef, or #ifndef directives because statements under the control of a conditional preprocessor directive are not enclosed in braces ({ and }). Therefore, #endif must be used to mark the end of the block of statements.
Q: – Can the conditional expression following the #if directive be an arithmetic expression?
Yes
Q: – What is the difference b/n run time binding and compile time binding?
When the address of functions are determined a run time than it is called run time or dynamic binding or late binding. While when the addresses of functions are determined a compile time than it is called compile time or static binding or early binding.
Q: – Why do you need the #endif directive?
The key difference b/n linker and linkage is that linker is used to change an object code into an executable code by linking together the necessary build in functions. Place where we declare the variable in a program is called the linkage of variable.
Q: – What is the Double LinkedList?
Double Linked List is that each data item in the list can point both side(next or previous)data item.
Q: – Can we write a program with out using main() function?
No
Q: – Explain “method”?
A Method is a programmed procedure. It is defined as part of a class also included in any object of that class. Class can have more than one methods. It can be re-used in multiple objects.
Q: – What is the Double LinkedList?
Double Linked List is that each data item in the list can point both side(next or previous)data item.
Q: – Can we write a program with out using main() function?
No

Tagged , . Bookmark the permalink.

Leave a Reply