Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3.2 We wish define a string variable (really, it\'s an object, but think of it a

ID: 3528011 • Letter: 3

Question

3.2 We wish define a string variable (really, it's an object, but think of it as being like a variable) named last_name. (a) Write the preprocessor directive to include the requisite header file. (b) Write the statement to define last_name. (c) Write an assignment statement that assigns "Flintstone" to last_name. (d) A sequence of zero or more characters enclosed in double quotation marks, such as "Flintstone", is called a(n) ___ ___ (2 words). (e) Explain the difference (or is there) between "" and "?". (f) What is "" called? Note: ? represents the space character.

Explanation / Answer

a) # inlclude #inlclude inlclude b) char last_name[20][20}; c) last name = "Flintstone" d) character array or array of characters e) "" represents null character ; null means no chracter, number or space whereas " " represents a space which is not null
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote