What type of error will result from the following statement?
int main(int argc, char* argv[])
{
char i[7];
strncpy(i, “sdfusdofof”, sizeof(i));
}
A.
Unbounded string copy
B.
Null-termination
C.
String-termination
D.
String truncation
Explanation:
What type of error will result from the following statement?
int main(int argc, char* argv[])
{
char i[7];
strncpy(i, “sdfusdofof”, sizeof(i));
}
What type of error will result from the following statement?
int main(int argc, char* argv[])
{
char i[7];
strncpy(i, “sdfusdofof”, sizeof(i));
}
A.
Unbounded string copy
B.
Null-termination
C.
String-termination
D.
String truncation
Explanation: