Professional Documents
Culture Documents
LAB Exercise 1
LAB Exercise 1
Languages
1. Which of the followings variables are invalid? Why?
a. _number : valid
b. Main : valid
c. 1number : valid
d. Total number : invalid have space
e. eat@here : valid
f. ToTaL_DiScOuNt : invalid
(10 marks)
A. -1
B. 1
C. 0
D. Programs do not return a value.
A. start()
B. system()
C. main()
D. program()
3. What punctuation is used to signal the beginning and end of code blocks?
A. { }
B. -> and <-
C. BEGIN and END
D. ( and )
A. */ Comments */
B. ** Comment **
C. /* Comment */
D. { Comment }
(5 marks)