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?

Answer Posted / uma maheswari

#include<stdio.h>
#include<conio.h>
int i=1;
void main()
{
i<=100 ? printf("%d\n",i) : getch(); //conditional operator
i++;
main(); //recursive calling of main() function
}

Is This Answer Correct ?    10 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is identifiers in c with examples?

1142


Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?

972


Explain threaded binary trees?

1119


hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel

1830


What are nested functions in c?

986


Write a program to print “hello world” without using semicolon?

1088


How can I trap or ignore keyboard interrupts like control-c?

1033


Linked lists -- can you tell me how to check whether a linked list is circular?

1040


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1901


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1102


largest Of three Number using without if condition?

1548


How is a pointer variable declared?

1036


Write a c program to demonstrate character and string constants?

2134


Explain what does it mean when a pointer is used in an if statement?

1023


What does %d do?

1217