7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM TECHNOLOGICAL UNIVERSITY OF THE PHILIPPINES
COLLEGE OF SCIENCE
COMPUTER STUDIES DEPARTMENT
Final Examination – Second Semester SY 2022 - 2023
Programming Language
Prof. Edward N. Cruz
Name: Course:
Date: Score:
___________________________________________________________________________________
Multiple Choice. Select the best answer of your choice. Encircle the letter of the correct answer.
Test I.
1. A statically-typed programming language developed by JetBrains. *
a) Java
b) Assembly Language
c) Kotlin
d) Javascript
2. Who is the father of C language? *
a) Steve Jobs
b) James Gosling
c) Dennis Ritchie
d) Rasmus Lerdorf
1
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
3. Kotlin is developed by? *
a) Google
b) Jetbrains
c) Microsoft
d) Adobe
4. How did I read in pascal? *
a) ReadLn
b) Scanner
c) Cin
d) println
5. What is an immutable variable? *
a) A variable that cannot change, read-only
b) A variable that can be changed
c) A variable used for string interpolation
d) A variable used for array
2
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
6. Which of the following is not a valid C variable name?
a) int number;
b) float rate;
c) int variable_count;
d) int $main;
7. It is the place where the computer stores temporary data like the variables in a program.
a) Stack Values
b) Memory Values
c) Register Values
d) None of the choice
8. TURBO PASCAL was launched in that year by BORLAND International?
a) 1970
b) 1983
c) 1900
d) 1978
3
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
9. What is C++?
a) C++ is an object-oriented programming language
b) C++ is a procedural programming language
c) C++ supports both procedural and object-oriented programming language
d) C++ is a functional programming language
10. An operator in kotlin that is used to provide a default value when a nullable object is null.
a) Bitwise Operator
b) Elvis Operator
c) Nullability Operator
d) Logical Operator
11. Which of the following is the correct syntax of including a user defined header files in C++?
a) #include [userdefined]
b) #include “userdefined”
c) #include <userdefined.h>
d) #include <userdefined>
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 4
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
12. Which of the following option leads to the portability and security of Java? *
a) Bytecode is executed by JVM
b) The applet makes the Java code secure and portable
c) Use of exception handling
d) Dynamic binding between objects
13. A programming language that was developed by Brad Cox and Tom Love in the early 1980s.
a) C language
b) Objective-C
c) Kotlin
d) C++
14. Which file extension is used to save Kotlin files. *
a) .java
b) .kot
c) .kt
d) .lin
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 5
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
15. Which of the following is not a Java features? *
a) Dynamic Architecture
b) Neutral
c) Use of pointers
d) Object-oriented
16. The first line of the program #import <Foundation/Foundation.h> is a preprocessor command for which
programming language?
a) C
b) C++
c) Objective C
d) Java
17. Which of the following is used for comments in C++? *
a) /* comment */
b) / comment */
c) / comment
d) both / comment or /* comment */
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 6
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
18. C++ is a statically type programming language thatruns on the Java Virtual Machine (JVM) and can be
compiled to JavaScript or native code.
a) True
b) False
19. What are the predefined data types in TURBO PASCAL? *
a) Integer
b) Real
c) String
d) All of the above
20. Who designed the Pascal programming language? *
a) Bill Gates
b) Steve Jobs
c) Blaise Pascal
d) Niklaus Wirth
21. In Assembly language, the instructions like MOV or ADD are called as *
a) OP-Code
b) Commands
c) Operators
d) None of the mentioned
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 7
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
22. Which of the following is true about return type of functions in C? *
a) Functions can return any type
b) Functions can return any type except array and functions
c) Functions can return any type except array, functions and union
d) Functions can return any type except array, functions, function pointer and union
23. Which of the following is not a data type in Pascal? *
a) Integer
b) Real
c) String
d) Float
24. In Assembly language, the extension file that is must for a file to be accepted by the LINK as a valid object file
is?
a) .OBJ file
b) .MASM file
c) .EXE file
d) DEBUG file
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 8
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
25. is used to find and fix bugs in the Java programs. *
a) JVM
b) JRE
c) JDK
d) JDB
26. Evaluate the following Java expression, if x=3, y=5, and z=10: ++z + y - y + z + x++
a) 24
b) 23
c) 20
d) 25
27. Which of the following user-defined header file extension used in c++?
a) hg
b) cpp
c) h
d) hf
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 9
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
28. Which of the following type is provided by C++ but not C? *
a) double
b) float
c) int
d) bool
29. Which of the following correctly declares an array in C++? *
a) array{10};
b) array array[10];
c) int array;
d) int array[10];
30. Which of the following are language processors *
a) assembler
b) compilers
c) interpreter
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 10
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
31. What is the syntax for declaring a variable in Pascal? *
a) var variable_name: data_type;
b) variable_name: data_type var; data_type:
c) variable_name var; data_type var:
d) variable_name;
32. What is the purpose of a semicolon in Pascal? *
a) To indicate the end of a line of code
b) To separate multiple statements on the same line
c) To declare a variable
d) To comment out a line of code
33. A datatype in javascript whose instances are unique and immutable. *
a) Null
b) Symbol
c) Object
d) Undefined
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 11
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
34. What is the purpose of the “writeln” statement in Pascal? *
a) To declare a variable
b) To assign a value to a variable
c) To read input from the user
d) To output a value to the console
35. Programming language in which there is a very strong correspondence between the language and the
architecture's machine code instructions is termed as;
a) machine language
b) assembly language
c) high level language
d) medium language
36. In Java, JDK stands for .
a) Java development kit
b) Java deployment kit
c) JavaScript deployment kit
d) None of these
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 12
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
37. Which of the following true about Javascript? *
a) Client-side JavaScript does not allow the reading or writing of files
b) JavaScript cannot be used for networking applications
c) JavaScript doesn't have any multi-threading or multiprocessor capabilities
d) All of the above
38. Which class in Java is used to take input from the user? *
a) Scanner
b) Input
c) Readln
d) Scanf
39. The #include <stdio.h> is a
a) Inclusion directive
b) File inclusion directive
c) Preprocessor directive
d) None of the above
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 13
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
40. Which of the following is the correct syntax to create a variable in Java? *
a) var name;
b) int name;
c) var name int;
d) All of these
41. Which keyword is used to define the macros in c++? *
a) #macro
b) #define
c) macro
d) define
42. What is Inheritance in C++? *
a) Deriving new classes from existing classes
b) Overloading of classes
c) Classes with same names
d) Wrapping of data into a single class
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 14
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
43. C language is a successor to which language?
a) Basic
b) Cobol
c) C++
d) B
44. What is meant by a polymorphism in C++? *
a) class having only single form
b) class having four forms
c) class having many forms
d) class having two forms
45. How structures and classes in C++ differ?
a) Structures by default hide every member whereas classes do not
b) In Structures, members are public by default whereas, in Classes, they are private by default
c) Structures cannot have private members whereas classes can have
d) In Structures, members are private by default whereas, in Classes, they are public by default
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 15
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
46. In C, what are const data types used for? *
a) Unknown values
b) Static or constant values
c) Dynamic variable values
d) All of the above
47. Assembly language programs are written using *
a) Hex code
b) Mnenonics
c) ASCII code
d) Option 4
48. What is the meaning of below lines? *
a) void sum (int, int);
b) sum is function which takes int arguments
c) sum is a function which takes two int arguments and returns void it will produce compilation error
d) None of the choice
https://docs.google.com/forms/d/1lOKzt-WwNND4gCZ3U00rwArINh26v0eH4tSw8D3NYdY/edit?pli=1&pli=1#settings 16
7/18/23, 2:14 Final Exam on Programming Language-BSCS3C
PM
49. Which keyword is used for function in Python language? *
a) Function
b) def
c) Fun
d) Define
50. It is an integrated development environment and compiler programming language, developed by
Anders Hejlsberg at Borland in 1983.
a) Javascript
b) Pascal
c) Kotlin
d) C
Page 1 of 17
Programming Language