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!!!)


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More OOPS Interview Questions

What is difference between abstraction and encapsulation?

0 Answers  


Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.

1 Answers  


swapping program does not use third variable

5 Answers   TCS,


What is use of overloading?

0 Answers  


We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?

8 Answers   IBM, Sage, Vertex,


#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

0 Answers  


What is the purpose of polymorphism?

0 Answers  


How to overload new operator in c++

2 Answers  


What is destructor in oop?

0 Answers  


What is the use of oops?

0 Answers  


What is oops concept with example?

0 Answers  


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

0 Answers  


Categories