Purchase Solution

What character array's size would be large enough to hold "H

Not what you're looking for?

Ask Custom Question

In the following example, why would we declare an array of 4 instead of 3?

#include <stdio.h>

void main (void)
{
/* arrays */
char id[4] = "POS";
short qty[3] = {33, 37, 30};
}

What character array's size would be large enough to hold "Hello world"?

Purchase this Solution

Solution Summary

The character array's size which would be large enough to hold "Hello world" is provided.

Solution Preview

The string "POS" contains in fact one extra character whose numerical value is 0.
By convention, this type of strings must necessarily end with the zero character.

The string ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.