which of the following is the reference data type ?
Select one:
a. array
b. int
c. short
d. double
What is the output of this program?
Select one:
a. 1
b. Runtime error owing to division by zero in if condition.
c. 2
d. Unpredictable behaviour of program.
What is the result of the following Java coding snippet?
class TestApp {
public static void main() {
int odd = 1;
if (odd) {
System.out.println("odd");
} else {
System.out.println("even");
}
}
}
Select one:
A. odd
B. Type mismatch error
C. Run-time exception
D. even
Write a C++ program that creates a 2D array having 4 rows and 4 columns. Then, ask the user to input values for the 2D array or matrix. After that, the program should calculate transpose of a matrix. Transpose is basically calculated by changing rows of matrix into columns and columns into rows. After calculating, display the final matrix?
Write a program to take input for n book records from user and write those book records in a file named: ”record”, whose price is less than INR 500 . Program should also perform random access in the file, after taking input for a particular record number to read and it should also perform random record overwriting after taking input of new record and the record number to overwrite. After overwriting record, display all records on the screen. [Attributes of book: Book_id, Book_price, Book_name, Book_author_name]
Suppose that you have a computer with a memory unit of 24 bits per word. In this
computer, the assembly program’s instruction set consists of 198 different operations.
All instructions have an operation code part (opcode) and an address part (allowing for
only one address). Each instruction is stored in one word of memory.
a. How many bits are needed for the opcode?
b. How many bits are left for the address part of the instruction?
c. How many additional instructions could be added to this instruction set without
exceeding the assigned number of bits? Discuss and show your calculations.
d. What is the largest unsigned binary number that the address can hold
Write a program to perform class to basic conversion [such as : class is : Triangle with data members base and height (float), and basic type is float(area of triangle)].
Write a program to overload operators in the same program by writing suitable operator friend function for following expression.
O7=((O1>=O2)+(O3&&O4) *(O5<O6)) [here O1,O2,O3,O4,O5,O6 and O7 are object of a class ''overloading", and this class is having one integer data member]
Explain the difference between constructor and initializer list.
Create a program using Python for Eduvos based on the above scenario. The program should initially display a welcome message. The program should then do the following: 3.1 Prompt the user to enter the number of students to be captured. 3.2 Handle exceptions to ensure that the user enters a number. 3.3 Prompt the user to enter the student’s name, exam 1 and exam 2 marks. 3.4 Calculate the test average. 3.5 Use tuples to handle records. 3.6 The records should then be written to a file called studentsexammarks.txt. 3.7 The program should display the recorded test marks on the screen.