Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Write a C program to print 1 2 3 ... 100 without using
loops?

Answers were Sorted based on User's Feedback



Write a C program to print 1 2 3 ... 100 without using loops?..

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

Write a C program to print 1 2 3 ... 100 without using loops?..

Answer / olga

void printer(int num)
{
if(n==0)
return;
printer(--n);
printf("%d ",n);
}

Is This Answer Correct ?    11 Yes 14 No

Write a C program to print 1 2 3 ... 100 without using loops?..

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

Write a C program to print 1 2 3 ... 100 without using loops?..

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

Write a C program to print 1 2 3 ... 100 without using loops?..

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

Post New Answer

More C Interview Questions

How to write in a function declaration and in function call in which the function has 'n' number of varible or arguments?

2 Answers  


What is a newline escape sequence?

0 Answers  


What are two dimensional arrays alternatively called as?

0 Answers  


given post order,in order construct the corresponding binary tree

0 Answers   S-Cube, Wipro,


What does int main () mean?

0 Answers  


Why we use int main and void main?

0 Answers  


how is the examination pattern?

0 Answers   Wipro,


Convert a distance from miles to kilometers .there are 5280 feets per mile,12 inches per foot .2.54 centimeters per inch and 100000centimeters per kilometer

0 Answers   TCS,


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

0 Answers  


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

0 Answers   Wilco,


What are the __date__ and __time__ preprocessor commands?

0 Answers  


How are 16- and 32-bit numbers stored?

0 Answers  


Categories