NEW
Font size
WorksheetsUnderstanding Source Code and Functions
Total questions: 10
Worksheet time: 5mins
How is source code different from executable code?
Source code runs faster than executable code
Executable code is human-readable, while source code is binary
They are the same thing
Source code is written by humans, executable code is generated by compilers
What is source code?
The machine-readable code that the CPU executes
Human-readable instructions written in a programming language (plain-text)
Binary numbers only
A special type of comment in C
Do standard functions or main need to have a function description?
Only user defined functions require a description
Only main requires a description
No, neither require a description
Yes, both require a description
Variable names don’t need to convey meaning or follow standards.
True
False
To follow standards, does a programmer provide a function description to the main function?
Yes, always
No, main does not require a function description
Only in C++
Only if the program has more than one function
The functions supplied in the stdio.h library allow for what?
Mathematical calculations
Variable declarations
File encryption
Input and output operations
If the incorrect specifier is used for an output specification, what can happen?
The program might crash or display incorrect data
Nothing, the program runs normally
The variable automatically converts to the correct type
The compiler fixes the mistake
Does an output specifier change the way data is stored in the program or computer?
Yes, but only for integers
No, it only changes how the data is displayed
Yes, it changes how memory stores the data
Yes, but only when using floats
What are the three types of errors a program can contain?
Logic, integer, compiler
Syntax, runtime, logic
Compiler, binary, pointer
Input, output, syntax
What is a defined constant that uses the #define syntax?
A variable that changes its value during program execution
A symbolic name that represents a fixed value
A function that returns a constant
An integer declared in main
