Write a program for print infinite numbers
Answers were Sorted based on User's Feedback
Answer / chavidi
void main()
{
int i=0;
while()
{
printf("%d",i)
i++;
}
}
Is This Answer Correct ? | 25 Yes | 12 No |
Answer / shani jaiswal
main()
{
static int i=0;
printf("%d",i);
i++;
main();
return 0;
}
Is This Answer Correct ? | 10 Yes | 0 No |
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 |
write a program for size of a data type without using sizeof() operator?
22 Answers HCL, IBM,
how do you execute a c program in unix.
What is a segmentation fault?
When is a “switch” statement preferable over an “if” statement?
What is the best style for code layout in c?
Whats wrong with the following function char *string() { char *text[20]; strcpy(text,"Hello world"); return text; }
What is volatile variable in c?
Write a program to print all permutations of a given string.
How does pointer work in c?
write a program to print data of 5 five students with structures?
main() { int i = 1; int num[] = {1,2,3,4}; num[i] = i++; printf("%d", num[i]); } what will be the output? }
22 Answers NDS, TCS,
What is the purpose of sprintf() function?