Question

Explain the use of the string library functions strncpy() and strncat(), with the help of an example for each.

18 Feb 2025
Answer :
Word Count : 223

The `strncpy()` function is used to copy a specified number of characters from one string to another. It ensures that no more than `n` characters are copied, making it safer than `strcpy()`, which does not limit the number of characters. If the source string is shorter than `n`, the destination string is padded with

__________ ______ ________ _________ _______ ______ _______ ____ ___ __________ ___ _________.
_______ ________ _____ _________ ______ _____ _______ ___ ____.
___ _____ __________ _______ ______ ____ ___ ___ ___ ____.
______ _______ _______ _______ _________.
_______ _____ _____ __________ ______ ________ ____ ___ ________.
_________ _______ __________ ________ ______ ________ ______.
______ _______ ___ _____ _______ __________ _________ ____ ________ _________.
______ _______ ___ _________ _________ _______.
______ ________ ___ ________ _________.
______ __________ ____ _______ ___.
___ ________ _______ _______ _____ ____ ___.
_____ ____ ______ _____ _______.
________ ______ ___ _______ ________ ______ ___ _______ _________ _______ _________.
___ _________ _____ ____ ______ ___ ______ ________ _________ ________.
_________ ____ ____ _____ __________.
___ _____ ________ ______ _________ ________ ________ _________ _____ ______.
________ _____ ______ _________ ___ ______ ______ ____ ________ _____ _______ ____.
______ __________ ____ ______ _______ __________ _________.
________ ______ ___ _______ _______ ________ _______ ____.
___ ______ ________ ______ ________ _____ ________ __________ _____ _____ __________.
___ ___ ____ _____ _______.
IGNOU ACADEMY
Your IGNOU journey, made easier.
  • Solved Assignments
  • Study Notes
  • Guess Papers
  • Question Papers
Skip in 10
Top
📞
Call Support Instant phone assistance IGNOU MMT 1 2025 - Explain the use of the string library functions strncpy() and strncat( | IGNOU Academy
→
🟢
WhatsApp Chat Fast live messaging
→
Email Us Business enquiries & support
→