Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ReadMe
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Started
I fixed all the bugs.
1 change: 1 addition & 0 deletions ReadMe~
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Started
3 changes: 2 additions & 1 deletion contributers.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Mohammed Fawzan, The Architect
Mohammed Fawzan, The Architect
Thusitha Wijerathne, Contributer
Binary file added corrupt
Binary file not shown.
3 changes: 2 additions & 1 deletion corrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ int main(){


int i;
char string[42] = "Brace your self, CO328 project is coming!!";
//char string[42] = "Brace your self, CO328 project is coming!!";
char string[43] = "Brace your self, CO328 project is coming!!";
int j;

return 0;
Expand Down
23 changes: 23 additions & 0 deletions corrupt.c~
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Author : Mohammed Fawzan
* Problem : Synecdoche
*/
#include <stdio.h>

/**
* I am trying to do something with this method. Life is too short... So I'm lazy to explain myself.
* Can you find a mistake in the code?
* Come on! it's just 3 lines of code, you should do better by now!
* You need a clue?
* In the hitch hikers guide to the Galaxy, 42: The answer to life, the universe and everything
*/
int main(){


int i;
char string[42] = "Brace your self, CO328 project is coming!!";
char string[43] = "Brace your self, CO328 project is coming!!";
int j;

return 0;
}
3 changes: 2 additions & 1 deletion min.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ int getMin(int *Array, int n) {
int currmin = MAXINT;

for (int i=0; i<n; i++)
if (Array[i] > currmin)
//if (Array[i] > currmin)
if (Array[i] < currmin)
currmin = Array[i];
return currmin;

Expand Down
24 changes: 24 additions & 0 deletions min.c~
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Author : Mohammed Fawzan
* Problem : If Then Else
*/

/**
* Find the minimum vlue from a given integer array
* @param int* A pointeer to an integer array
* @param int n number of elements in the array
*/
int getMin(int *Array, int n) {

//this is a useless comment
int currmin = MAXINT;

for (int i=0; i<n; i++)
if (Array[i] < currmin)
currmin = Array[i];
return currmin;

}



3 changes: 2 additions & 1 deletion numbers.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ int main(){

int x;
for(x=43; x<12423; x++);
printf('x = %d \n', x);
//printf('x = %d \n', x);
printf("x = %d \n", x);

return 0;
}
18 changes: 18 additions & 0 deletions numbers.c~
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Author : Mohammed Fawzan
* Problem : Point of Origin
*/
#include <stdio.h>

/**
* I want to print some numbers
* Can U fxi mE?
*/
int main(){

int x;
for(x=43; x<12423; x++);
printf("x = %d \n", x);

return 0;
}
4 changes: 3 additions & 1 deletion theta.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ char * giveMeSomeMemory ( int size ){
char * str ;
if (size > 0)
str =( char *) malloc ( size );
if (size == 1)
//if (size == 1)
else{
return NULL ;
}
return ( str );
}
22 changes: 22 additions & 0 deletions theta.c~
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Author : Mohammed Fawzan
* Problem : Guilty
*/

/**
* I need a chunk of string for given size,
* Am I making a mistake? You tell me.
*/



char * giveMeSomeMemory ( int size ){
char * str ;
if (size > 0)
str =( char *) malloc ( size );
//if (size == 1)
else{
return NULL ;
}
return ( str );
}