What type of error will result from the following statement?

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:



Leave a Reply 0

Your email address will not be published. Required fields are marked *