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!!!)
What is difference between abstraction and encapsulation?
Write an operator overloading program to Overload ‘>’ operator so as to find greater among two instances of the class.
swapping program does not use third variable
What is use of overloading?
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?
#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
What is the purpose of polymorphism?
How to overload new operator in c++
What is destructor in oop?
What is the use of oops?
What is oops concept with example?
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?