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 |
Explain 'far' and 'near' pointers in c.
What is the difference between variable declaration and variable definition in c?
#include show(int t,va_list ptr1) { int a,x,i; a=va_arg(ptr1,int) printf(" %d",a) } display(char) { int x; listptr; va_star(otr,s); n=va_arg(ptr,int); show(x,ptr); } main() { display("hello",4,12,13,14,44); }
In a byte, what is the maximum decimal number that you can accommodate?
What is difference between main and void main?
What is difference between constant pointer and constant variable?
Write a program to reverse a string.
0 Answers Global Logic, iNautix, TCS, Wipro,
What are the types of arrays in c?
what is the difference between unix os and linux os
main() { int age; float ht; printf("Enter height and age"); scanf("%d%d",&height,&age); if((age<=20)&&(ht>=5)) {printf("She loves you");} else {printf("She loves you");} }
Write the Program to reverse a string using pointers.
What is the purpose of void in c?