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
What is identifiers in c with examples?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
Explain threaded binary trees?
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
What are nested functions in c?
Write a program to print “hello world” without using semicolon?
How can I trap or ignore keyboard interrupts like control-c?
Linked lists -- can you tell me how to check whether a linked list is circular?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Explain how do I determine whether a character is numeric, alphabetic, and so on?
largest Of three Number using without if condition?
How is a pointer variable declared?
Write a c program to demonstrate character and string constants?
Explain what does it mean when a pointer is used in an if statement?
What does %d do?