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

A box of oats cereal measures 24 cm long by 5 cm wide 25 cm high. A box of rice cereal measures 26 cm long by 4 cm wide by 28 mm high. Which box has the greater
Anton Leeuwenhoek devised a primitive microscope to observe a sample of his tooth scrapings. How did this help contribute to cell theory
help me thank u so much
How would you write 82 as a Roman numeral
Analyze the sentence to determine whether it contains a dangling construction or is written correctly. If found, we will reward anyone returning the wallet. A
Someone help me please, 25 points
Budding produces small projections from one parent which split off to form offspring. True False
Please I need some help!!!!!!! The sum of the series \(\sum_{i^{-1}}^{10}5\left(\frac{1}{2}\right)^i\) is \(\frac{x}{1,024}\). Then x =_______.
Chymotrypsin catalyzes the hydrolysis of a peptide bond and is therefore categorized as a _____.
Help please and that you 13-16