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, 22.06.2019 03:40
Mary's manager told her she should insert a graphic into her documentwrite mary a brief note describing how to insert a graphicin a word processing document.
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
In which job role will you be creating e-papers, newsletters and preiodicals
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
A. in packet tracer, only the server-pt device can act as a server. desktop or laptop pcs cannot act as a server. based on your studies so far, explain the client-server model.
Answers: 2
question
Computers and Technology, 24.06.2019 00:00
The gene form of a trait is called a(n) 
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
Chemistry, 20.05.2021 21:40
question
Mathematics, 20.05.2021 21:40
question
Chemistry, 20.05.2021 21:40
question
Mathematics, 20.05.2021 21:40
Questions on the website: 13722362