Write a C program to print 1 2 3 ... 100 without using
loops?
Answer Posted / lakshmipraba
#include<stdio.h>
int i;
void main()
{
if(i<=100)
{
printf("%d ",i);
i++;
main();
}
if(i>100)
exit(0);
}
| Is This Answer Correct ? | 14 Yes | 3 No |
Post New Answer View All Answers
What is call by reference in functions?
How are portions of a program disabled in demo versions?
What is function prototype in c language?
What is difference between array and structure in c?
What is the process to generate random numbers in c programming language?
How is actual parameter different from the formal parameter?
Explain how can you check to see whether a symbol is defined?
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
Write a C program that will accept a hexadecimal number as input and then display a menu that will permit any of the following operations to be carried out: Display the hexadecimal equivalent of the one's complement. (b) Carry out a masking operation and then display the hexadecimal equivalent of the result. (c) Carry out a bit shifting operation and then display the hexadecimal equivalent of the result. (d) Exit. If the masking operation is selected, prompt the user lor the type of operation (bitwise and, bitwise exclusive or, or bitwise or) and then a (hexadecimal) value for the mask. If the bit shifting operation is selected. prompt the user for the type of shift (left or right), and then the number of bits. Test the program with several different (hexadecimal) input values of your own choice.
what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values
What is strcpy() function?
Why should I use standard library functions instead of writing my own?
What is return in c programming?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
the 'sizeof' operator reported a larger size than the calculated size for a structure type. What could be the reason?