Computing.Net > Forums > Programming > What's worng with this!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

What's worng with this!

Reply to Message Icon

Name: bctps55
Date: November 3, 2003 at 02:12:30 Pacific
OS: Windows XP Pro
CPU/Ram: 2Ghz/256DDR
Comment:

#include <stdio.h>
#include <conio.h>

char* ReturnSmallerChar(char* s1, char* s2);

void main()
{
char str1[5], str2[5];
int i;
clrscr();

printf("Enter str1: ");
gets(str1);
printf("Enter str2: ");
gets(str2);
char* str= ReturnSmallerChar(str1,str2);
printf(" The Smaller Character is: ");
for (i=0; i<5; i++)
printf("%c", str);
}

char* ReturnSmallerChar(char* s1, char* s2)
{
char* temp;
int a=0;

if (s1[a]>s2[a])
temp[a]=s2[a];
else
temp[a]=s1[a];

a++;
if(a<5)
return(ReturnSmallerChar(s1,s2));
else
return temp;
}



Sponsored Link
Ads by Google

Response Number 1
Name: SN
Date: November 3, 2003 at 08:29:06 Pacific
Reply:

Tell us what errors you're getting so we don't have to look through all your code and take guesses.
-SN


0

Response Number 2
Name: brian
Date: November 3, 2003 at 22:10:35 Pacific
Reply:

Nothing, I already fix. Thx anyway!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: What's worng with this!

what's wrong with this code? www.computing.net/answers/programming/whats-wrong-with-this-code/8504.html

What's Up With All The VB www.computing.net/answers/programming/whats-up-with-all-the-vb/7089.html

what's wrong with my batch file? www.computing.net/answers/programming/whats-wrong-with-my-batch-file/19477.html