Организовать функцию,вычисляющую сумму двух чисел,которые передаются в неё не значениями,а указателями- C++(Си)

#include<stdio.h>
#include<conio.h>

int sum( int* a, int* b ){
  return( *a + *b );
}
 
int main(int,char**){
  int a=10,b=20; 
  printf( "%d\n", sum( &a, &b ) );
  return 0;
}

2 Thoughts to “Организовать функцию,вычисляющую сумму двух чисел,которые передаются в неё не значениями,а указателями- C++(Си)”

  1. You really make it seem so easy together with your presentation but I find this matter to be actually something which I think I would by no means understand.

    It kind of feels too complicated and extremely wide for me.

    I’m having a look forward to your subsequent submit, I will try to get the hold of
    it!

  2. I was reading some of your blog posts on this internet site and I think
    this internet site is very instructive! Keep on putting up..

Leave a Comment