I have two codes and two question.
Question about first code: Has an integer promotion been made? I mean, y–>Promoted int –>Double ? or y–>Double?
Question about second code: Has an integer promotion been made? I mean, x and y–>Promoted int?
//First code
#include <stdio.h>
int main() {
double x=17.123;
short y=13;
x+y;
return 0;
}
//Second Code
#include <stdio.h>
int main() {
short x=17;
short y=13;
x+y;
return 0;
}
New contributor
İlker Deveci is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.