Basic Syntax Flashcards
Given the source code below, how many tokens make up the statement?
printf(“Hello COP 3223!”);
5
In a C program, an individual statement must be ended with a semicolon.
True
There are multiple formats of an acceptable comment in C, select all that apply.
- /* comment */
- // comment
Regarding identifiers for variables, functions, or any other user-defined item, which of the following are acceptable? Select all that apply.
_variable
variable
VARIABLE
var23iable
Regarding keywords in the C programming language and creating identifiers. Keywords are reserved in all lowercase AND all uppercase.
False
Regarding whitespace in the C programming language, spaces are required between the operators in the following source code in order to compile, run, and provide the correct output.
int sum=2+3/2-12*15;
False