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

write a proram to reverse the string using switch case?

2685


Write a program to print ASCII code for a given digit.

890


Why should I prototype a function?

850


What are the types of assignment statements?

830


How many levels of pointers have?

798


What is meant by keywords in c?

843


Write a program to reverse a string.

845


What would be an example of a structure analogous to structure c?

782


What is a newline escape sequence?

862


Why do we use null pointer?

787


What is the use of a ‘’ character?

808


How is pointer initialized in c?

794


What is an example of structure?

806


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

5163


Is c language still used?

737