Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / sagar
we can also create such a program without using loops and if
statement too ...
void main()
{
int i,n;
clrscr();
A:
printf("%d",i);
n=i++;
switch(n)
{
case 100: break;
default : goto A;
}
getch();
}
Is This Answer Correct ? | 9 Yes | 7 No |
Post New Answer View All Answers
Are there namespaces in c?
What is the difference between array and linked list in c?
Who developed c language?
Is c language still used?
C language questions for civil engineering
Is void a keyword in c?
What is meant by keywords in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
Tell me can the size of an array be declared at runtime?
What are the primitive data types in c?
Explain how can I right-justify a string?
Why dont c comments nest?
Can we add pointers together?