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

Why does John Henry die after the contest with the steam engine? A. He thinks he has lost and dies of a broken heart. B. He was never in good physic
Can anyone tell what is -5+__=5 a.5 or b.0
What did Congress create after the Love Canal contamination and other events involving hazardous waste?
“Clouds” in space can begin as what?
Compute the work preformed when 32 pounds is lifted 10 feet_____________WHOEVER GIVES RIGHT ANSWER GETS BRAINLEST
eight wooden spheres with radii 3 in. are packed snugly into a square box 12 in. on one side. the remaining space is filled with packing beads. what is the volu
which sentence best explains what the author is suggesting through the witches' foreshadowing in this sentence?
The___wind scattered the leaves around the garden
anyone in connections taking chemistry that can help me? P.S this IS a question so do not delete it.
Someone please help me