Write a program for print infinite numbers

Answer Posted / greg

#include <math.h>

static void checkinfinit(double x)
{
if (isinf())
{
printf("Infinite\n");
}
}

int main(int argc, char **argv, char **envp)
{
checkinfinite(1.0);
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the importance of c in your views?

800


#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }

963


Explain how can I remove the trailing spaces from a string?

802


Explain zero based addressing.

778


Why string is used in c?

751


How can my program discover the complete pathname to the executable from which it was invoked?

846


Can we change the value of constant variable in c?

805


why we wont use '&' sing in aceesing the string using scanf

2064


What are the different types of C instructions?

966


What is use of pointer?

776


What happens if you free a pointer twice?

804


What is the difference between null pointer and wild pointer?

913


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

904


Can you subtract pointers from each other? Why would you?

744


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

2507