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 program in c to print **** * * * * ****

1 Answers   TCS,


write a program without using main function?

2 Answers   TCS,


What is difference between structure and union in c?

0 Answers  


How can I recover the file name given an open stream or file descriptor?

0 Answers  


what is the value of 'i'? i=strlen("Blue")+strlen("People")/strlen("Red")-strlen("green")

7 Answers   Cadence, JNTU, Zen Technologies,






#include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=0.5; if(a==0.5) printf("yes"); else printf("no"); getch(); }

9 Answers   TCS,


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

0 Answers   Subex,


What is the use of getch ()?

0 Answers  


Fifty minutes ago if it was four times as many mints past 3 o clock. how many minutes is it to six o'clock n how....?????

3 Answers   TCS,


for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable

2 Answers  


is compiler do read the data line by line or not. ??

6 Answers   LG Soft, Satyam, Tech Mahindra,


Write a C++ program to give the number of days in each month according to what the user entered. example: the user enters June the program must count number of days from January up to June

0 Answers  


Categories