awk '
NR == FNR{ #for lines in first file
S[NR] = $0 #put line in array 'S' with row number as index
next #starts script from the beginning
}
/^c/{$0=S[FNR]}{ #for line stared with 'c'
}
1 #alias for 'print $0'
' file2 file1