program in c to print 1 to 100 without using loop

Answer Posted / nishikant kamble

#include<stdio.h>
int main()
{
int i=1;
suhas:
printf("%d\t",i);
i++;
if(i==101)
{
exit(1);
}
goto suhas;
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why pointers are used?

629


Why do we use main function?

630


Write a Program to accept different goods with the number, price and date of purchase and display them

5439


What is the use of linkage in c language?

611


What functions are used in dynamic memory allocation in c?

591






Simplify the program segment if X = B then C ← true else C ← false

2579


What is bss in c?

596


Is file a keyword in c?

496


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...

4900


Why is main function so important?

611


How do we make a global variable accessible across files? Explain the extern keyword?

1416


What is a built-in function in C?

786


What are the 4 types of functions?

566


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1209


What are the various types of control structures in programming?

623