Write a C++ program without using any loop (if, for, while
etc) to print numbers from 1 to 100 and 100 to 1;
Answer Posted / shubham gupta
#include<stdio.h>
void fun(int n)
{
static int i=1,j;
printf("%d\n",i);
(100-i)?(i++?fun(n):0):exit(0);
}
int main()
{
int n;
n=100;
fun(n);
}
Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer
What are the loops in c?
Explain what is wrong with this statement? Myname = ?robin?;
What is the deal on sprintf_s return value?
Explain the advantages of using macro in c language?
What are the types of pointers in c?
What is 2c dna?
Explain how do you view the path?
What is c variable?
Explain how can I convert a string to a number?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
What is the difference between strcpy() and memcpy() function in c programming?
difference between Low, Middle, High Level languages in c ?
What are predefined functions in c?