Programming MCQS - QUESTION DETAILS

What is the purpose of the 'strncpy' function in C?
A. Compare strings
B. Concatenate strings
C. Copy a specified number of characters from one string to another
D. Convert strings

'strncpy' is used to copy a specified number of characters from one string to another.

Similar Questions

What is the role of 'calloc' function in C?






How do you close a file in C?






What is the format specifier for printing a float in C?






In C, how do you declare a constant?






How is a single-line comment written in C?






What is the output of printf("%s", "Hello" + 1);?






How do you open a file for writing in C?






What is the role of the 'static' keyword in Java?






What is the purpose of the 'strcat' function in C?






What is the purpose of the 'super()' constructor in Java?