In this post, we are going to understand difference between macro and function. But before getting started, I want to explain little bit about macro and function to you in an easy way. What is a function? A function can be stated as a group of statements that performs some kind of task. In every C program, you’ll notice at least one function that is main() function. The execution of the program starts from there only. You can divide your code into smaller functions for reducing the size of the body of main() function. Now let us see the syntax of a function. return_type function_name(parameter){ //body of the function } What is a macro? Macros are used to define symbolic constants. It is a preprocessor directive, which means it replaces itself with the value which is given to it. Let us understand it with an example. #include <stdio.h> #define X 3 //macro definition int main(){ int x = 10; printf("%d\n", x + X); //here the value of 'X...
Just4Programmers can be described as a private limited company that develops softwares. Kayleigh Baxter who is the current Managing Director established it in early 1997. For several years now, Just4Programmers has been a proud Microsoft Gold Partner. This is to mean that it displays the best expertise and competence with regard to Microsoft technologies and also in relation to being an Amazon Web Services specialist.