?
Solved

primitive types and null terminators

Posted on 2004-09-03
1
Medium Priority
?
261 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 45

Accepted Solution

by:
sunnycoder earned 150 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

801 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