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
How old is c programming language?
How are strings stored in c?
What is the difference between malloc() and calloc()?
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
How are pointers declared in c?
What is the newline escape sequence?
define string ?
What is character constants?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
What is the difference between typedef and #define?
why wipro wase
Is c pass by value or reference?
What is variable and explain rules to declare variable in c?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
How do you determine the length of a string value that was stored in a variable?