Easy Tutorial
❮ C Function Toupper C Function Raise ❯

C Exercise Example 44

C Language Classic 100 Examples

Title: Learning how to call external functions.

Program Analysis: None.

Program Source Code:

Example

//  Created by www.tutorialpro.org on 15/11/9.
//  Copyright © 2015 tutorialpro.org. All rights reserved.
//

#include <stdio.h>
int a, b, c;
void add()
{
    int a;
    a = 3;
    c = a + b;
}
int main()
{
    a = b = 4;
    add();
    printf("The value of c is %d\n", c);
    return 0;
}

The output of the above example is:

The value of c is 7

C Language Classic 100 Examples

❮ C Function Toupper C Function Raise ❯