Solved

primitive types and null terminators

Posted on 2004-09-03
1
254 Views
Last Modified: 2010-04-15
When one uses the standard sprintf function that formats and copies your argument to a buffer, it is highly recomended that the argument be null terminated.
If the argument is an int or a long, etc, are these primitive types by default null terminated?
0
Comment
Question by:ipaman
1 Comment
 
LVL 45

Accepted Solution

by:
sunnycoder earned 50 total points
ID: 11971886
Hi ipaman,

> If the argument is an int or a long, etc, are these primitive types by default null terminated?

You do not have to worry about the built in types ... compiler knows very well how to handle them ... It is the likes of strings which are not natively supported that we need to think about

Sunnycoder
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now