---
title: "Should I put '\\0' in my C strings?"  
description: "Should I put '\\0' in my C strings?"  
author: "Mukul Goenka"  
published: 2021-11-10  
canonical: https://www.mindstick.com/interview/33813/should-i-put-0-in-my-c-strings  
category: "java"  
tags: ["java", "programming language"]  
reading_time: 1 minute  

---

# Should I put '\0' in my C strings?

Should I put '\0' in my C strings?

## Answers

### Answer by Ravi Vishwakarma

'\0' is zero character. In C it is mostly used to indicate the termination of a character string. Of course it is a regular character and may be used as such but this is rarely the case. your string is automatically add the null-terminated(or ends with \0 ) at the end of string, but you add no effect on code.

### Answer by Mukul Goenka

Should I put '\0' in my C strings?


---

Original Source: https://www.mindstick.com/interview/33813/should-i-put-0-in-my-c-strings

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
