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

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.