How to print in C

Very much a beginner to C, in fact this is my first tester program.

I can’t actually figure out how to print this number out to the terminal.

#include <stdio.h>

int addNumbers(int a, int b)
{
    int sum = a + b;
    return sum;
}

int main(void)
{
    int a = 4;
    int b = 7;

    printf(addNumbers(a,b));
    return 0;
}

I am sure that in Java I could just replace the printf with System.out and it would have worked. I tried searching the answer earlier but if you don’t know what to search it’s hard to find an answer.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)