What happens here? sizeof(short_int_variable + char_variable)
#include <stdio.h> int main() { short int i = 20; char c = 97; printf("%d, %d, %d\n", sizeof(i), sizeof(c), sizeof(c + i)); return 0; } Could some one tell me what happens when sizeof(a+b) "a is short int type & b is char type" Output is : 2, 1, 4 Because of C's standard integral promotion rules , the type of the expression c + i is int , so that's why you're getting the equivalent of sizeof (int) . Note that sizeof is not a function, the parenthesis are only needed when naming a type and to resolve precendence conflicts . Your code coule be written: printf("%zu, %zu, %zu\n", sizeof i, sizeof