1 votes 1 votes #include<stdio.h> int func(){ return (double)(char)5.0; } What will be the data type returned? A)char B)int C)double D)multiple type casting in return is illegal Programming in C programming-in-c + – Satwik Mishra 1 asked Aug 28, 2017 Satwik Mishra 1 8.3k views answer comment Share Follow See 1 comment See all 1 1 comment reply amrendra pal commented Aug 29, 2017 reply Follow Share Answer is : B int the return data type of the function func is int , so its returns int , while how much type casting (which is valid) is done . 1 votes 1 votes Please log in or register to add a comment.
Best answer 2 votes 2 votes Int will be returned because the (type) operator has right to left associativity. Thus first 5.0 is typecast to char then to double and at the end return type of function is int so B should be the answer. Shivam Chauhan answered Aug 29, 2017 selected Aug 29, 2017 by Satwik Mishra 1 Shivam Chauhan comment Share Follow See all 0 reply Please log in or register to add a comment.