Write a C program to print 1 2 3 ... 100 without using
loops?
Answers were Sorted based on User's Feedback
Answer / vikash kumar dixit
#include<stdio.h>
#include<conio.h>
void main()
{
int i,n;
A:
printf("%d",i);
i++;
switch(n)
{
case 100:
break();
default:goto A;
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / olga
void printer(int num)
{
if(n==0)
return;
printer(--n);
printf("%d ",n);
}
| Is This Answer Correct ? | 11 Yes | 14 No |
Answer / mwolo fabrice
#include<stdio.h>
#include<conio.h>
void main()
{
int n=100,i;
scanf("%d",&i);
if(i<n)
{
printf("\n %d\n",i);
}
getch();
}
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / professor uday kumar bhupathi
void main(int n)
{
if(n==0)
return;
main(--n);
printf("%d ",n);
getch();
}
| Is This Answer Correct ? | 12 Yes | 16 No |
Answer / vijaya raghavan
#include<stdio.h>
int i=100;
main()
{
if (i==0) return 0;
printf("%d\t",i);
i--;
main();
}
| Is This Answer Correct ? | 4 Yes | 11 No |
write a program fibonacci series and palindrome program in c
0 Answers Aditi Placement Service,
How to develop software using "c" programming?
1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?
write a c program to find biggest of 3 number without relational operator?
How can I copy just a portion of a string?
write a c program to find the sum of five entered numbers using an array named number
what is the diference between pointer to the function and function to the pointer?
how to print this sereis 2 4 3 6 5..........?
Read the following data in two different files File A: aaaaaaaadddddddd bbbbbbbbeeeeeeee ccccccccffffffff File B: 11111111 22222222 33333333 By using the above files print the following output or write it in the Other file as follows aaaaaaaa11111111dddddddd bbbbbbbb22222222eeeeeeee cccccccc33333333ffffffffffff
create a C program that displays one z,two y's,three x's until twenty six A's. plzz answer i need it tomorrow.
Is flag a keyword in c?
What is the heap in c?