Write a program for print infinite numbers

Answers were Sorted based on User's Feedback



Write a program for print infinite numbers..

Answer / chavidi

void main()
{
int i=0;
while()
{
printf("%d",i)
i++;
}
}

Is This Answer Correct ?    25 Yes 12 No

Write a program for print infinite numbers..

Answer / shani jaiswal

main()
{
static int i=0;
printf("%d",i);
i++;
main();
return 0;
}

Is This Answer Correct ?    10 Yes 0 No

Write a program for print infinite numbers..

Answer / 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

More C Interview Questions

Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /).

1 Answers  


program to find the magic square

1 Answers   Infosys,


6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()

2 Answers   Accenture,


What is wrong with this initialization?

0 Answers  


What's the right way to use errno?

0 Answers  






WAP to find that given no is small or capital

3 Answers  


Explain the red-black trees?

0 Answers  


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

0 Answers  


swap two integer variables without using a third temporary variable?

6 Answers   Persistent,


Give a fast way to multiply a number by 7

15 Answers   Accenture, Aricent, Microsoft,


to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

0 Answers  


main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }

4 Answers   Vector,


Categories