Validating e-mail address input in C
Formatting


for (i = 0, ch = test; *ch; *ch++) {
        if (*ch == '@') {
            pos1 = ch;  // &lt;-stores last @ address
            i++;
        }
    }
    pos2 = ch;



You have an extraneous level of indentation in there that throws out that block.


int     i;
char    *pos1, *pos2;
char    *ch;



This is a weird indentation level, it doesn't match anything else and is unnecessary. It literally just complicates how you read it.



Naming


int test(char test[]):



Naming both your function and variables test is bad practice. How am I meant to tell as an outsider reading your code what it is that your code does.


/* Pos1 - test &lt;-a character must be before "@". Ch - pos1 &lt;-Counts
 * backwards from the end of the string towards "@". A character
 * must be between "@" and "." */



If you feel the need to explain your code with comment blocks like this, you can probably improve your naming.

Name your variables as to what they are. For Example: charactersAfterAt.



Duplicate Logic


scanf("%39s", test);
while(1){
    // ...
    scanf("%39s", test);
}



You can reduce duplicate logic by declaring the scan inside the loop at the top.