Home » Personal

Hello! with a C programming Tip

Posted on 25 FEB 2017 Under Personal Category

Dear friends, I want to say "Hello" to everyone.
I hope you are learning well, if you are facing any problem to access particular content you can write me. Of you can also write your doubt (most of the new posts have commenting section below the post).

Today's C programming Tip:

Initialize a character array with NULL, while declaring, it will take care of the string (character array) variable by NULL termination bugs while comparing, copying the character array.

Here is the correct method to declare a string

char text[100]={0};

A character array text will declare in the memory with 100 bytes, each byte (memory block) will be initialized with NULL (0).



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.