Answer to Question #273223 in C for sthe

Question #273223
  1. Fill in the missing statements in the following program
  2. #include<stdio.h>
  3. int addition ();
  4. int  ()
  5. {
  6. int result;
  7. int (*ptr) ();
  8. ptr = &addition;
  9.  = (*ptr) ();
  10. printf ("The sum is d", result);
  11. }
  12.  
  13. int addition ()
  14. {
  15. int a, b;
  16. ("Enter two numbers: ");
  17.  ("%d %d", &a, &b);
  18. return a + b;
  19. }
1
Expert's answer
2021-11-29T10:31:29-0500

#include<stdio.h>

int addition ();

int  main()

{

    int result;

    int (*ptr) ();

    ptr = &addition;

    result = (*ptr) ();

    printf ("The sum is %d", result);

}

 

int addition ()

{

    int a, b;

    printf("Enter two numbers: ");

    scanf("%d %d", &a, &b);

    return a + b;

}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS