Commit c77ed8c5 authored by Zara Saldanha's avatar Zara Saldanha

Update ishell.c

parent 22995973
......@@ -70,7 +70,7 @@ void split(char *input) {
exec(shell_path,argv);
}
int compare(char* argv[]) {
int compare_strings(char* argv[]) {
if(strcmp(argv[1],argv[2])==0){
return 1;
} else {
......@@ -142,8 +142,8 @@ int main(){
}
//compare two strings (problem 5)
if(strcmp(argv[0], "compare")==0){
if(compare(argv)==1){
if(strcmp(argv[0], "strings")==0){
if(compare_strings(argv)==1){
printf("Both strings are the same!\n");
} else {
printf("The strings are different!\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment