I have a HW assignment that I am getting stuck on, hopefully someone can help me fix my code. There are 3 separate programs, I feel confident in the second one, and it compiled with no errors, but number 1 and 3 have proven to be a little trickier for me. Thanks in advance for your help.

1) Create a 2-by-3 two-dimensional array of integers and fill it with data. Loop through the array and locate the smallest value stored. Print out the smallest value as well as its row and column position in the array.

Code:
#include <stdio.h>

main ()

{
void selectionSort (int a[], int size)
{
int arr[2][3]={
{1,2},
{4,5},
{7,8}
};
int pass, min, minIndex;
for (pass = 0; pass < size - 1; pass++)
{
min = a[pass];
minIndex = pass;
printf("\nSmallest Value is: %d\n", minIndex);
}
return;
}
}

2) Prompt the user for 3 sentences of text. Pass these pieces of text into a function connect() which will connect all three sentences into one long sentence. Pass the combination sentence back to the main program, where it is printed.

Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

char *combineString(char *string1, char *string2, char *string3)
{
char *CombinedString;

CombinedString = malloc(80);

CombinedString[0] = 0;

strcat(CombinedString, string1);
strcat(CombinedString, " ");
strcat(CombinedString, string2);
strcat(CombinedString, " ");
strcat(CombinedString, string3);
return (CombinedString);
}

int main ()
{
char string1[20];
char string2[20];
char string3[20];

printf("Please enter first sentence: ");
scanf(" %19[^\n]", string1);

printf("Please enter second sentence: ");
scanf(" %19[^\n]", string2);

printf("Please enter third sentence: ");
scanf(" %19[^\n]", string3);

printf("Combined sentence is: %s\n\n", combineString(string1,string2,string3));

getchar();
getchar();
return(0);
}

3) Write a program that will prompt the user for a file name and open that file for reading. Print out all the information in the file, numbering each new line of text.

Code:
#include <stdio.h>

int main(void)
	{
	int c;
	FILE *file;
	file = fopen("test.txt", "r");
	if (file) {
	while ((c = getc(file)) != EOF)
		putchar(c);
	fclose(file);
	return 0;
	}