lastwarior1332 lastwarior1332
  • 06-08-2019
  • Computers and Technology
contestada

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, ");

Respuesta :

ExieFansler ExieFansler
  • 07-08-2019

Answer:Following is the C program:-

#include <stdio.h>

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.

Answer Link

Otras preguntas

Name three current problems in your life that might be solved through a heuristic approach. Explain why each of these problems is heuristic in nature.
A ball released from the tree top if a height of 45m. How long does it take to reach the ground?
--------I the capital of the team ​
(x+5)-(x - 5)² for x = 3
In need help with the passage On thin ice The first quetion is It is implied that ice floats and land is important to swimming polar bears because... a B c d I
Подготовить сообщение про аварию на фукусиме
How does American National Identity relate/connect to the Seneca Falls Convention?
write two uses of echoes​
Given the equations, identify which way the parabola opens by matching an equation on the left with a term on the right. =-10y y²=6x x=3y y² = -2x ↑ up down rig
examples and non examples of a electron