subject

1. Write a function called changeLetter that can directly alter the value of a character variable. It takes one argument: a reference to a character. It returns nothing. If the passed in character is alphabetic ('a' to 'z' or 'A' to 'Z'), then make the character become the next higher ASCII value ('a' becomes 'b' etc.). If the passed in character is not a letter, don't alter it. 2. Write a calling statement for the changeLetter function. It takes one argument: a reference to a character and returns nothing. The calling statement should pass the char variable ch so that it is (potentially) altered.
3. Write a calling statement for the changeLetter function. It takes one argument: a reference to a character and returns nothing. The calling statement should pass the 2nd character in a char array called chAr (by second, I mean the sub-oneth) so that it is (potentially) altered.
4. Assume the following function header:

void fn( int &n )

Write an instruction for the function body that will store 10 into the caller's variable referred to by n.
5. Write a calling statement for the fn function. It takes one argument: a reference to an integer and returns nothing. The calling should pass the integer variable num to the function so that it can be altered.
6. The strlen() function returns
A. the number of chars in an array of char, including the null
B. the number of chars in an array of char not including the null
C. the declared number of chars an array can hold
7. What must be true of the arguments to strcat(s1, s2); More than one answer may be correct
A. s1 must be valid strings
B. s2 must be a valid string
C. s1 must have room to contain the result
D. s2 must have room to contain the result
8. How is a structure different from an array?
9. Write a definition for a structure called Part that can hold a part name (an array of characters that can hold 24 characters plus a null terminator), a part weight (int), and a part price (float). Make up appropriate names.
10. Assume the following structure definition:

struct Person

{

char name[50];

int age;

};

Write a declaration for a variable of type Person and initialize it with your name and the age 10. This should be done as part of the variable declaration statement.

11. Assume the following structure definition:

struct Person

{

char name[50];

int age;

};

Write a declaration for a variable of type Person and initialize it with your name and the age 10. This should be done as several executable statements.

12. Declare an array of 10 Person structures named peopleArray.

13. Assume the following structure definition and declaration:

struct Person

{

char name[50];

int age;

};

Person people[265];

Assuming that the people array contains 265 valid structs, write code to print out the age member for each item in the structure.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:30
Rafael needs to add a title row to a table that he has inserted in word. what should he do? use the alignment options. use the merge and center option for all the cells in the top row. use the merge and center option on the first two cells in the top row. none of the above
Answers: 3
question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
question
Computers and Technology, 23.06.2019 20:10
Leo is a recruitment executive for a large company. he has identified new labor resource requirements in both the marketing and production departments. what should be his first step in recruiting candidates for the positions? a. conduct background checks of candidates b. make job offers c. arrange interviews d. conduct reference checks e. place job ads on job sites
Answers: 1
question
Computers and Technology, 24.06.2019 03:40
4. does the kernel phenotype distribution support the idea that the cob is the result of a dihybrid cross? what information supports your answer? if a dihybrid cross (i.e. f1 to f2 of standard mendelian crosses) is not indicated what conditions might contribute to this finding.
Answers: 2
You know the right answer?
1. Write a function called changeLetter that can directly alter the value of a character variable. I...
Questions
question
Mathematics, 09.07.2019 08:30
question
Geography, 09.07.2019 08:30
question
Social Studies, 09.07.2019 08:30
question
Mathematics, 09.07.2019 08:30
question
English, 09.07.2019 08:30
Questions on the website: 13722367