Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)
Answer Posted / sweetsmiracle17
plz provide answer
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].
how to print the character with maximum occurence and print that number of occurence too in a string given ?
What are the types of arrays in c?
What are header files? What are their uses?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
What are the keywords in c?
What is the scope of an external variable in c?
What is a node in c?
What is pointer and structure in c?
Which is best book for data structures in c?
What are data structures in c and how to use them?
What are structure types in C?
How are structure passing and returning implemented?
When can you use a pointer with a function?
What is quick sort in c?