Ask Question
14 May, 07:08

Write a C program that has the following statements: int a, b; a = 10; b = a + fun (); printf ("With the function call on the right, ");

+5
Answers (1)
  1. 14 May, 08:23
    0
    Answer:Following is the C program:-

    #include

    int fun () / /function fun of return type int and it returns value 6.

    {

    return 6;

    }

    int main () {

    int a, b;

    a = 10;

    b = a + fun (); //adds 6 to a.

    printf ("With the function call on the right, ");

    printf ("/n%d ", b); //printing b ...

    return 0;

    }

    Output:-

    With the function call on the right,

    16

    Explanation:

    The function fun return the value 6 so it adds 6 to a and stores the result in b.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a C program that has the following statements: int a, b; a = 10; b = a + fun (); printf ("With the function call on the right, "); ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers