Get me a number puzzle game-program
2317
#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
2604
How do you achieve runtime polymorphism?
1097
write a code for this:trailer recordId contains a value
other than 99, then the file must error with the
reason ‘Invalid RECORD_ID’(User Defined Exception).
2200
#include
#include
#include
#include
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
2685
What are oops methods?
1073
How to use CMutex, CSemaphore in VC++ MFC
4835
Can enum be null?
1071
What is this pointer in oop?
1124
to find out the minimum of two integer number of two different
classes using friend function
2184
Can destructor be overloaded?
1096
What does it mean when someone says I oop?
1121
Please send ford technologies placement paper 2 my mail id
2148
What is pointer in oop?
1125
What is encapsulation in oop?
1100