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

What is titan made of?
hey can someone help me out
If thers 5 buses and there are 30 wheels in total how many wheels are there per bus?
В. Solve what is asked. Show your solutions on your answer sheet. Label your final answers 8) The school successfully implemented 85% of their planned activitie
Ben is seeking a control objective framework that is widely accepted around the world and focuses specifically on information security controls. Which one of th
what is the lcm of 590 and 4890?
Kellen studies the natural breeding patterns of large wild mammals in Colorado, such as elk. Which is most likely Kellen’s career pathway? wildlife biology vete
What is the result when the number 90 is increased by 50%?
use sound devices in a paragraph​
Solve the following proportion for v. y