Solved

primitive types and null terminators

Posted on 2004-09-03
1
252 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

747 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

13 Experts available now in Live!

Get 1:1 Help Now