← Back to Printing
Question 6
Multiple Variables
Multiple Variables
Create a char array with the value "Sarah" and an int variable with the value 22. Use one printf statement to display the output shown in Expected Output. Use%sfor the string and%dfor the int. Make sure to use the variables in the correct order within printf.
Expected Output:
My name is Sarah and I am 22 years old= newline. No newline after the last line.
Hints3 available
Sign in to use hintsTopics:
Printing
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.