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

Differentiate between null and void pointers.

635


Does c have function or method?

596


What is data type long in c?

627


Can a pointer be volatile in c?

539


What is boolean in c?

615






write an algorithm to display a square matrix.

2226


What is a program flowchart and explain how does it help in writing a program?

682


How to explain the final year project as a fresher please answer with sample project

472


Discuss the function of conditional operator, size of operator and comma operator with examples.

682


What is function prototype in c language?

619


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

581


What is oops c?

616


What is scope rule in c?

609


Which function in C can be used to append a string to another string?

649


Explain what is the stack?

638