54.1k views
2 votes
. what action does the following a default operator perform? int a, b, c; a = b + c;

1 Answer

3 votes

Answer:

The code defines 3 integers a, b and c, then defines a as the sum of b and c.

Step-by-step explanation:

In the programming language C int data type is used to declare an integer variable, that is, it can store only both negative or positive integers. I will leave a complete example about it:

#include <conio.h>

#include <stdio.h>

int main()

{

int a, b, c;

printf( "\\ Introduce first integer (entero): " );

scanf( "%d", &b );

printf( "\\ Introduce second integer (entero): " );

scanf( "%d", &c );

a = b + c;

printf( "\\ The sum is: %d", a );

getch(); /* Pause */

return 0;

}

User SamuelN
by
6.8k points