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

What is linear search?

0 Answers  


a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6

7 Answers   TCS,


write a program to find lcm and hcf of two numbers??

1 Answers  


Hai sir, I had planned to write the NIC scientific engineer exam , plz post the sample question......

0 Answers  


for questions 14,15,16,17 use the following alternatives:a.int b.char.c.string.d.float

1 Answers  






1. Duplicate the even numbers. -1 Sample I/O Array1:- 4,2,24,3,22 Updated Array:- 4,4,2,2,24,24,3,22,22 2. Reverse the array in a region - 1 Sample I/O Array1:- 4,2,24,3,22,41,21 Enter Region:- 2,5 Update Array:-4,41,22,3,24,2,21 3. Store first the even digits in an array and then odd digits in same array -2 Sample I/O Array1:- 4,2,24,3,22,41,21 Array 2:- 4,2,2,4,2,2,4,2,3,1,1 4. Store the count of the digits in all numbers in an array and print the count. -2 Sample I/O Array1:- 4,2,9,3,7,41,28 Array 2:- 0,1,1,1,2,0,0,1,1,1 1-1;2-1;3-1;4-2;7-1;8-1;9-1 5. Store all palindrome numbers in to another array -2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array 2:- 4,22,9,313,141 6. Arrange the array in such a way that odd numbers come first and then even numbers -1 Sample I/O Array1:- 4,22,9,313,7,141,28 Update Array1:- 9,313,7,141,4,22,28 7. Store into another array by inserting it in the right place - 2 Sample I/O Array1:- 4,22,9,313,7,141,28 Array2:- 4 /4,22 /4,9,22 /4,9,22 ,313 /4,7,9,22 ,313 /4,7,9,22 ,141,313 / 4,7,9,22,28 ,141,313 8. Merge two sorted arrays in a sorted fashion - 3 Sample I/O Array 1:- 3,6,7,9,11,16 Array 2:- 1,2,5,7,20 Array 3:- 1,2,3,5,6,7,9,11,16,20 9. Upadte the array so that an array element is followed by its revere - 1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:- 13,31,63,36,74,47,9,9,11,11,16,16 10.Spread the digits of the array in the same array. -1 Sample I/O Array 1:- 13,63,74,9,11,16 Updated Array 1:-1,3,6,3,74,9,1,1,1,6 11.Shift the boundary of array to have only 2 digit numbers. Sample I/O Array 1:- 139,643,74,9,101,126 Updated Array 1:- 13,96,43,74,91,11,26 12.Print the largest occuring digit in an array of N numbers. Sample I/O Array 1:- 13,63,74,9,11,16 1 occurs most.

2 Answers   Intel,


What does the && operator do in a program code?

0 Answers  


In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }

1 Answers  


What are volatile variables?

1 Answers   Mind Tree,


Wt are the Buses in C Language

0 Answers   Infosys,


What is the role of && operator in a program code?

0 Answers  


What is string in c language?

0 Answers  


Categories