Question

Declare char word[10]; Which one of the following is true: word can store Mississippi word[10] = 0; word can store hello
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Option 2

Answer:

word[10] = '\0';

Note: Please comment below if you have any doubts. upuote the solution if it helped. Thanks!

Add a comment
Know the answer?
Add Answer to:
Declare char word[10]; Which one of the following is true: word can store "Mississippi word[10] =...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Part I. Representation of a String The primitive type char is used to store a single...

    Part I. Representation of a String The primitive type char is used to store a single character, whether it is a letter, number or special character (for example: space, tab, or new line). More often, we want to store a string of characters in a single variable. We can do this by using a variable of the class type String. A String variable can be initialized to a String literal (which is similar to how a char variable can be...

  • Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal...

    Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal '2', a string literal "2", and the numeric literal 2 are identical and stored the same way though they are different types. 3 Since comments do not affect the program execution, you don't need to have it at all. 4. After the following statements are executed, the value of the variable rem is 3. 1. A preprocessor directive line starts with a pound sign...

  • Which of the following statements is true about this array declaration? Declare Integer numbers [5] =...

    Which of the following statements is true about this array declaration? Declare Integer numbers [5] = 123,456,789,321, 654 This is an error: there should be 6 integers in the array. This is an array declaration and initialization. This is an error; the values of the array should be 1, 2, 3, 4,5 0 None of these statements are true.

  • 1. Write True or False: If it is false make it True by changing one word....

    1. Write True or False: If it is false make it True by changing one word. (6 points) 1) Reserved words cannot be used as identifiers. True 2) The type 'Long' can hold strings. 3) Global variables exist only within the compound statement in which they are declared 4) Enumeration type can store a list of constants of type double.

  • If we declare double *total, which of the following statements is true? We can get the...

    If we declare double *total, which of the following statements is true? We can get the value that total is pointing to by using _ A. &total B. total C. *total D. &(*total)

  • Question 1 When you declare a variable of type Single, it contains 0 by default. True...

    Question 1 When you declare a variable of type Single, it contains 0 by default. True False Question 2 The following line declares an array that can contain whole numbers, with 10 elements. Dim Variables(9) As Integer True False Question 3 Once a variable is declared we can not change the variable's data type. True False Question 4 If A is False and B is True, then A Or B is True because A is False. True False Question 5...

  • Create a UNIX makefile for the following C program: //convert.c char toUpper(char c){ if(c>='a' && c<='z')...

    Create a UNIX makefile for the following C program: //convert.c char toUpper(char c){ if(c>='a' && c<='z') return c-32; return c; } //converting sentance to upper void convertSentence(char *sentence){ int i=0; while(sentence[i]!='\0'){ //convert to upper for each character sentence[i] = toUpper(sentence[i]); i++; } } //converting all sentences into uppercase void convertAll(char **sentenceList, int numOfSentences){ int i=0; while(i<numOfSentences){ //calling convertsentence function to conver uppercase convertSentence(sentenceList[i]); i++; } } sentences.c #include<stdio.h> #include<stdlib.h> #include "convert.c" int main(){ //declaring character array char **mySentences; int noOfSentences;...

  • 4. [8] Write a C function with prototype void letter_freq(const char wordll, int freaq ); This...

    4. [8] Write a C function with prototype void letter_freq(const char wordll, int freaq ); This function computes the number of appearances of each letter in the string word and stores them irn array freq of size 26. The letters are the 26 letters of the Latin alphabet whose ASCII values are in the range 97-122 for the lower case letters, and in the range 65-90 for the uppercase letters. You must account for uppercase and lowercase letter variants, which...

  • u also need to store the letters' ASCII number in the freq array 4. [8] Write...

    u also need to store the letters' ASCII number in the freq array 4. [8] Write a C function with prototype · void letter_freq(const char word[], int freq []); This function computes the number of appearances of each letter in the string word and stores them in array freq of size 26. The letters are the 26 letters of the Latin alphabet whose ASCII values are in the range 97-122 for the lower case letters, and in the range 65-90...

  • 10. Which of the following statements is true?* (3 Points) The word "cost" has the same...

    10. Which of the following statements is true?* (3 Points) The word "cost" has the same meaning in all situations in which it is used. All organizations incur the same types of costs. Costs incurred in one year are always meaningful in the following year. Different cost concepts and classifications are used for different purposes. Cost data, once classified and recorded for a specific application are appropriate for use in any application.

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT