Loading paper…
Loading questions…
What is the degree of leaf node in a tree?
What is the main goal of Capability Maturity Model Integration (CMMI)?
Which type of software testing is used to confirm whether the software is according to customer’s requirements?
Which of the following is commonly used for measuring the performance of supercomputers?
Which software development model uses iterative cycles and continuous development?
Which of the following is the false statement in C language?
Which programming language uses the concept of friend function?
What is meant by refactoring code in SDLC?
What is the main purpose of using Trojans?
What is the correct data structure for implementing Huffman algorithm?
Which asymptotic notation gives the strict upper bound for a function?
Which one of the following is the fastest way of searching for a given key?
What is the role of parser?
Which optimization method involves minimizing the memory access count in a program?
What is the output of the following code? int main(){ int a = 40; int* ptr = &a; int& ref = *ptr; ref = 60; cout << a; }
The process of deleting an element from an empty stack is called:
How is the head node deleted in a doubly circular linked list?
Which technique works by selecting the local optimal choice at each step?
What is the time complexity of searching for an element in a hash table?
Which phase of compiler is responsible for abstract syntax tree (AST) generation?
(a) How is the Generative AI creating impacts on our society? Discuss the benefits and challenges associated with its use. Support your answer by adding examples. (b) Provide a comparison of different data storage devices in terms of speed, size, access time and cost. (c) What are Two's Complement numbers? Explain the working of it with examples. Discuss the practical scenarios where these numbers are used.
(a) What is the difference between shallow copy and deep copy of creating objects in C++. Discuss the cases where a specific copy should be used by providing examples. (b) State the difference between const keyword and static keyword in C++. Illustrate each keyword with suitable examples. (c) Explain the role of pure virtual functions in implementing abstract classes in C++. How do they differ from virtual functions? Give an example of C++ classes where both types of functions are used.
(a) Write a C++ program to output the arithmetic series of n terms. The series formula for calculating the sum of n terms is as follows: Sn = 𝑛 2 [2a + (n-1) d] , with values a = 5, d= 3 and n= 6, where a = first term, d= common difference and n = number of terms. (b) Write a C++ program to calculate and display the product of two matrices of order 2 x 2. The program should prompt the user to provide values of both matrices (c) Write a C++ program to demonstrate the two different complex numbers using structure. The program should use function to calculate the sum of complex numbers and display their result in the specific format such as (a + bi), where a and b are the real and imaginary part respectively and i is imaginary unit such as i = √−1.
(a) Demonstrate the use of stream insertion and extraction operators for creating custom objects. Provide a suitable coding example for illustrating the functional difference between them. (b) Implement a Book Management System consisting of three different classes. The book class should have data members such as book name, ISBN number, and publication year. The author class should have attributes such as author name, and author email. The publisher class contains attributes such as publisher name, publisher email and publisher address. Each book has an author and a publisher. The author and publisher are created and destroyed with books. When the book is deleted, the corresponding author and publisher should also be deleted. Write a C++ code of this system and explain how the composition relationship is used in this system.
(a) What are self-balancing Binary Search Trees? Under what circumstances, the self- balancing Binary Search Trees are preferred over Binary Search Tree? (b) Give pseudocode of implementing Fibonacci sequence recursively. Find the time complexity of this approach and explain how it is calculated. (c) Suppose you are the owner of a small manufacturing company that delivers goods to customers. During the sale season, you received a huge number of orders. To efficiently manage the orders, you need to sort the packages based on their weights. You are provided with the weights of 10 parcels (in kilograms) as shown below. Use the quick sort method to sort these parcels in ascending order. Weights: [30, 45, 10, 20, 75, 15, 85, 40, 05, 65] Clearly indicate the choice of pivot and reason for it. Provide a graphical representation with explanation at each step.