Essentially, yes. I handle strings a little differently than the way you have. Just how I learned them is all...
Code:
#include <stdio.h>
#include <string.h>
#define STRING_LENGTH 17 // max # of characters + 1
// completely arbitrary
int main(void)
{
int x;
char s1[STRING_LENGTH]; // how I'm used to seeing it
char s2[STRING_LENGTH]; // .. ditto ..
strcpy ("password", s1); // Copy the string into s1
printf(" Enter a password:\n");
scanf("%s", s2);
x = strcmp(s1,s2);
if (x == 0)
printf("password accepted");
else
printf("access denied");
return(0);
}