1 votes 1 votes What is the output of following program #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; } (A)2,1,2 (B)2,1,1 (C)2,1,4 (D)2,2,8 Programming in C data-structures programming-in-c + – Robin Hoque asked Aug 18, 2017 • retagged Aug 18, 2017 by Robin Hoque Robin Hoque 739 views answer comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Shubhanshu commented Aug 18, 2017 reply Follow Share it should be a) 0 votes 0 votes arch commented Aug 23, 2017 reply Follow Share how u get 4 as output? 0 votes 0 votes smsubham commented Sep 9, 2017 reply Follow Share Useful Read: https://stackoverflow.com/questions/24371868/why-must-a-short-be-converted-to-an-int-before-arithmetic-operations-in-c-and-c 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes how sizeof(c+i)= 4 ??? Akash Verma 1 answered Aug 18, 2017 Akash Verma 1 comment Share Follow See 1 comment See all 1 1 comment reply smsubham commented Sep 9, 2017 reply Follow Share See this: https://stackoverflow.com/questions/24371868/why-must-a-short-be-converted-to-an-int-before-arithmetic-operations-in-c-and-c 0 votes 0 votes Please log in or register to add a comment.