Advertisements

Search results for inline function

Example:[1]

            Write a program for illustrating the use of inline function in c programming.
          

            #include <stdio.h>
void inline test_inline_func1(int a, int b) 
{
    printf ("a=%d and b=%d\n", a, b);
}
int inline test_inline_func2(int x) 
{
    return x*x;
}
int main() {
    int tmp;
    test_inline_func1(2,4);
    tmp = test_inline_func2(5);
    printf("square val=%d\n", tmp);
    return 0;
}
          

 Search Links


 Popular C search MCQs


 Popular C search examples