VARIABLE DECLARATIONS AND DATA TYPES MULTIPLE CHOICE QUESTIONS
1
In many languages, what is the primary purpose of "declaring" a variable?
To delete it from the computer's memory
To tell the computer the name and type of data the variable will hold
To display the value of the variable on the screen
To perform a mathematical calculation
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
2
Which of the following is a valid variable name in most programming languages?
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
3
Which of the following best describes a "constant"?
A value that can be updated any time during program execution.
A named memory location whose value cannot be changed once assigned.
A type of variable that only stores text.
A reserved word used to define a new function
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
4
What happens if you try to reassign a value to a constant after its initial assignment?
The program will automatically create a new variable.
The value will change without any issues.
The program will ignore the new value.
The compiler or interpreter will likely throw an error.
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
A programmer wants to build a simple software to calculate the basic salary of workers.
Use the above information to answer questions 5 to 7.
5
What data type will she use for the salary input in the program?
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
6
What c programming function will she use to instruct a user to enter his/her hours worked?
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
7
What c programming function will she use to store the entered hours?
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages
8
A programmer wishes to use M for male and F for female. Which of the following data types will be appropriate to use?
Only premium members can:
- View explanation of multiple choice questions
- View solution to theory questions
- View solution to practical questions
- Download project files
- Receive support on programming errors
- Receive quick response to forum post
You can view our plans and subcribe to premium by clicking the link below:
Premium Packages