Solved

primitive types and null terminators

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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand recursion 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.

828 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