What is the difference between macros and inline functions?
Answer Posted / vishal
1> Macros are always expanded by pre-processor, whereas compiler may or may not replace the inline definitions. You cant force compiler to make a function inline. It is purely compiler based decision.
2> Debugging macros is also difficult.
3> Expressions passed as arguments to inline functions are evaluated once. In some cases, expressions passed as arguments to macros can be evaluated more than once.
Here i got exact answer : http://www.firmcodes.com/difference-macro-inline-c/
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can I find the modification date and time of a file?
What is huge pointer in c?
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
Differentiate between the = symbol and == symbol?
A global variable when referred to in another file is declared as this a) local variable b) external variable c) constant d) pointers
stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return -1. The function should not make use of any C library function calls.
In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.
Explain the difference between #include "..." And #include <...> In c?
What is %lu in c?
What are the application of void data type in c?
Is it valid to address one element beyond the end of an array?
Define Array of pointers.
What are the types of assignment statements?
what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)