how to find that no is int or float?

Answer Posted / srv

Using sizeof() operator.


if(sizeof(no)==2)
cout<<"no is int";
else
cout<<"float";

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()

689


Write a program to check palindrome number in c programming?

592


Explain what is the heap?

614


Here is a neat trick for checking whether two strings are equal

558


Why do we need arrays in c?

572






What is sizeof array?

600


main(){char *str;scanf("%s",str);printf("%s",str); }The error in the above program is: a) Variable 'str' is not initialised b) Format control for a string is not %s c) Parameter to scanf is passed by value. It should be an address d) none

714


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

624


Describe dynamic data structure in c programming language?

596


Which is better oop or procedural?

619


What is property type c?

596


What is a union?

602


How would you obtain the current time and difference between two times?

719


Explain how do you view the path?

644


What is the method to save data in stack data structure type?

598