What is encapsulation in simple terms?
1042
What is encapsulation in ict?
1062
What is the purpose of enum?
1012
What is the difference between a mixin and inheritance?
992
what are the ways in which a constructors can be called?
2139
What are constructors in oop?
1185
Can we have inheritance without polymorphism?
1028
Why oops is important?
1127
Can we create object of abstract class?
1099
#include
#include
#include
#include
void select(char *items, int count);
int main(void)
{
char s[255];
printf("Enter a string:");
gets(s);
select(s, strlen(s));
printf("The sorted string is: %s.\n", s);
getch();
return 0;
}
void select(char *items, int count)
{
register int a, b, c;
int exchange;
char t;
for(a = 0; a < count-1; ++a)
{
exchange = 0;
c = a;
t = items[ a ];
for(b = a + 1; b < count; ++b)
{
if(items[ b ] < t)
{
c = b;
t = items[ b ];
exchange = 1;
}
}
if(exchange)
{
items[ c ] = items[ a ];
items[ a ] = t;
}
}
}
design an algorithm for Selection Sort
2554
Why is there no multiple inheritance?
1004
What is the difference between abstraction and polymorphism?
1103
What is a superclass in oop?
1179
Why do we use class in oops?
967
What is a null tree?
1141