program in c to print 1 to 100 without using loop
Answer Posted / gadigebhasker
void otoh(int,int);
void main()
{
int x,y;
printf("enter initial value x & y final value\n");
scanf("%d%d",&x,&y);
printf("0 to 100 number\n");
otoh(x,y);
getch();
}
void otoh(int a,int i)
{
if(a<=i)
{
printf("%d\t",a++);
otoh(a,i);
}
else
printf("END");
}
Is This Answer Correct ? | 27 Yes | 4 No |
Post New Answer View All Answers
Why clrscr is used in c?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
which type of aspect you want from the student.
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
hi send me sample aptitude papers of cts?
Does c have function or method?
Why header files are used?
When should the volatile modifier be used?
All technical questions
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
Explain how can I write functions that take a variable number of arguments?
Why is this loop always executing once?
How to write a code for implementing my own printf() and
scanf().... Please hep me in this... I need a guidance...
Can you give an coding for c... Please also explain about
the header files used other than #include
What is external variable in c?
What are different types of operators?