Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the correct syntax to declare an array of 10 integers?
Remember to specify the type and size.
How do you initialize an array with values 1, 2, and 3?
Use curly braces with values inside.
What is the result of this declaration: int marks[5];?
Count how many integers can be stored here.
True or False: Strings in C++ must always end with a null character.
Think about how the end of a name is specified in programming.
Write a C++ program that declares an array, initializes it with values, and prints them using a loop.
Think about how to set up your for loop.
Explain the implications of not using the null terminator in a string declaration.
Consider what happens when the program tries to determine the length of the string.
5 more questions in this section. Enroll free to practise them all.
Enroll free