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

How to declare pointer variables?

892


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1695


Are bit fields portable?

883


What is a lookup table in c?

812


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

954


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1872


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

832


what is the height of tree if leaf node is at level 3. please explain

1823


What is the difference between array_name and &array_name?

972


What is meant by type specifiers?

873


What is the maximum length of an identifier?

876


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

1614


What is wrong with this code?

892


What are pointers? Why are they used?

832


Why is event driven programming or procedural programming, better within specific scenario?

2152