Long Questions (20*2=40 Marks)

1. Select the data which is given in nominal form.

  1. 4, 8, 12, 16

  2. 2.1, 3.1, 4.3, 7.6

  3. blue, gray, red, pink

  4. first, last, second, fourth

Show me the answer

Answer:

3) blue, gray, red, pink

Explanation:

Nominal data represents categories or labels without any specific order or value. In this case, the colors are nominal because they are just categories.

2. The binary value for decimal number 120 is ……

  1. 1111000

  2. 1100000

  3. 0100000

  4. 01FF

Show me the answer

Answer:

1) 1111000

Explanation:

The binary representation of the decimal number 120 is 1111000. This can be verified by converting 120 from decimal to binary.

3. Which of the following statements best describes the role of a configuration management tool in software engineering?

  1. It helps a graphical user interface for designing software architectures.

  2. It helps the process of generating code from high-level models or specifications.

  3. It helps track, control, and manage changes to software artifacts throughout the development lifecycle.

  4. It helps the testing and debugging software applications to ensure their correctness.

Show me the answer

Answer:

3) It helps track, control, and manage changes to software artifacts throughout the development lifecycle.

Explanation:

Configuration management tools are used to keep track of the various versions and changes of software artifacts (such as code, documentation, etc.) during the software development process.

4. What is the correct order of phases in the Object-Oriented Development Cycle?

  1. Analysis, Design, Implementation, Testing, Maintenance

  2. Design, Analysis, Implementation, Maintenance, Testing

  3. Analysis, Design, Implementation, Maintenance, Testing

  4. Design, Analysis, Testing, Implementation, Maintenance

Show me the answer

Answer:

1) Analysis, Design, Implementation, Testing, Maintenance

Explanation:

The correct order of phases in the Object-Oriented Development Cycle is typically Analysis, followed by Design, then Implementation, Testing, and finally Maintenance.

5. Consider ptr as an integer pointer that stores 1000 as an address. After performing ptr = ptr + 5, the resultant value in ptr will be …….

  1. 1000 + 5

  2. 1000 + sizeof(int) + 5

  3. 1000 + sizeof(int) * 5

  4. 1000 + 4 * 5

Show me the answer

Answer:

3) 1000 + sizeof(int) * 5

Explanation:

When performing pointer arithmetic, the result depends on the size of the data type the pointer is pointing to. Since ptr is an integer pointer, the expression ptr + 5 will add 5 times the size of an integer (typically 4 bytes on most systems) to the address. So the resultant address will be 1000 + 5 * sizeof(int).

6. Inline functions may not be useful for many embedded systems because, ………….. in embedded systems.

  1. function call overhead is negligible.

  2. overhead of a return call from a function is not important.

  3. thrashing due to inlining does not increase the size of the binary executable file.

  4. code size is more important than speed.

Show me the answer

Answer:

4) code size is more important than speed.

Explanation:

In many embedded systems, code size is often a critical factor because of limited memory resources. Using inline functions may lead to an increase in the size of the binary executable due to function duplication in the code, which can be undesirable in memory-constrained environments.

7. What does the following function do for a given Linked List with the first node as head?

void fun1(struct node* head) 
{ 
  if (head == NULL) 
    return; 
  fun1(head->next); 
  printf("%d ", head->data); 
}
  1. Prints all nodes of linked lists

  2. Prints all nodes of linked list in reverse order

  3. Prints alternate nodes of Linked List

  4. Prints alternate nodes in reverse order

Show me the answer

Answer:

  1. Prints all nodes of linked list in reverse order

Explanation:

This function performs a recursive traversal of the linked list. The function calls itself with the next node (fun1(head->next)) until it reaches the end of the list (where head becomes NULL). Once the base case is hit (when head == NULL), it starts unwinding the recursion, and the printf statement prints the data of each node.

Since the recursive calls happen before the printing (printf), the nodes are printed in reverse order compared to their original order in the linked list. This is a post-order traversal of the linked list, which results in printing the data of the nodes in reverse order.

8. Consider the following three processes in the FCFS.

Process ID
Burst Time
Arrival Time

P1

3

0

P2

6

3

P3

6

9

What is the average waiting time?

  1. 2

  2. 3

  3. 4

  4. 5

Show me the answer

Answer:

3) 4

Explanation:

The First-Come, First-Served (FCFS) scheduling algorithm executes processes in the order they arrive. To calculate the waiting time, we first determine the completion time of each process.

  • Process P1: Arrival time = 0, Burst time = 3, Completion time = 3, Waiting time = Completion time - Arrival time - Burst time = 3 - 0 - 3 = 0

  • Process P2: Arrival time = 3, Burst time = 6, Completion time = 9, Waiting time = 9 - 3 - 6 = 0

  • Process P3: Arrival time = 9, Burst time = 6, Completion time = 15, Waiting time = 15 - 9 - 6 = 0

Average waiting time = (Waiting time for P1 + P2 + P3) / 3 = (0 + 0 + 0) / 3 = 4

9. In 8086 microprocessors, MOV AX, BX is an example of …………

  1. Immediate addressing mode

  2. Register addressing mode

  3. Based indexed addressing mode

  4. Direct addressing mode

Show me the answer

Answer:

2) Register addressing mode

Explanation:

The instruction MOV AX, BX in the 8086 microprocessor is an example of register addressing mode. In this mode, the data is transferred between two registers (in this case, AX and BX).

10. Which of the following flags is not a part of the 8085 microprocessor?

  1. Sign Flag, Zero Flag

  2. Auxiliary Carry Flag

  3. Parity Flag

  4. Overflow Flag

Show me the answer

Answer:

4) Overflow Flag

Explanation:

The 8085 microprocessor does not include the Overflow Flag. The 8085 microprocessor contains the following flags:

  • Sign Flag (S): Set if the result of the operation is negative.

  • Zero Flag (Z): Set if the result of the operation is zero.

  • Auxiliary Carry Flag (AC): Used for Binary Coded Decimal (BCD) operations.

  • Parity Flag (P): Set if the number of 1's in the result is even.

The Overflow Flag is used in other microprocessors like the 8086, where it indicates an overflow in signed arithmetic operations, but it is not present in the 8085.

11. A typical TCP client application issues a sequence of TCP system calls as follows:

  1. socket, bind, connect, send, receive

  2. socket, bind, listen, send, receive

  3. socket, bind, listen, connect, send

  4. socket, bind, listen, connect, send, receive

Show me the answer

Answer:

1) socket, bind, connect, send, receive

Explanation:

The typical sequence of system calls for a TCP client application is as follows:

  1. socket(): Creates a socket endpoint for communication.

  2. bind(): (Optional in client-side, but required for servers) This binds the socket to a specific IP address and port number.

  3. connect(): The client uses this call to connect to a remote server by specifying the server's IP and port.

  4. send(): Sends data to the server.

  5. receive(): Receives data from the server in response to the sent request.

This sequence allows a TCP client to establish a connection with the server, send data, and receive a response. For a typical server, listen() and accept() calls would be involved, but they are not needed for the client.

12. The macro expansion for the following code in C programming language is …..

#define then  
#define begin { 
#define end ;} 
if( i>0) then begin a=1; b=2 end
  1. if(i>0) then {a=1;b=2}

  2. if(i>0) {a=1;b=2}

  3. if(i>0) then begin a=1; b=2 end

  4. if(i>0) then begin{ a=1; b=2 end}

Show me the answer

Answer:

  1. if(i>0) {a=1;b=2}

Explanation:

In this code, the macros then, begin, and end are defined to replace certain characters in the code. When the code is expanded:

  • then is replaced by nothing (empty string).

  • begin is replaced by the curly brace {.

  • end is replaced by the semicolon ;}.

Therefore, the macro expansion of the statement:

if( i>0) then begin a=1; b=2 end

becomes:

if(i>0) {a=1;b=2;}

13. Greedy Best-First Search is an informed search algorithm that:

  1. Expands nodes based on their depth in the search tree

  2. Expands nodes based on their evaluation function value

  3. Expands nodes randomly without any heuristic guidance

  4. Expands nodes in a breadth-first manner

Show me the answer

Answer:

2) Expands nodes based on their evaluation function value

Explanation:

Greedy Best-First Search is a search algorithm that selects nodes to expand based on the heuristic evaluation function, typically aiming to reach the goal as quickly as possible. It chooses the node that appears to be closest to the goal according to its heuristic estimate, without considering the path cost. This method doesn't guarantee an optimal solution but focuses on a faster approach by prioritizing nodes that seem promising.

14. Which of the following activation functions is commonly used for the output layer of a binary classification neural network?

  1. Sigmoid activation function

  2. Tanh activation function

  3. ReLU activation function

  4. Softmax activation function

Show me the answer

Answer:

1) Sigmoid activation function

Explanation:

The sigmoid activation function is commonly used for binary classification problems in neural networks. It outputs values between 0 and 1, which can be interpreted as probabilities. This is ideal for predicting binary outcomes, where a threshold (often 0.5) can be used to classify the output as one of the two possible classes. The other functions mentioned (Tanh, ReLU, Softmax) are typically used in different contexts or for multi-class classification problems.

75. What kind of support is provided by the Code Generation CASE tool?

  1. Cross referencing queries and requirements tracing

  2. Transformation of design records into application software

  3. Compiling, interpreting or applying interactive debugging code

  4. Transformation of design records into application software AND Compiling, interpreting or applying interactive debugging code

Show me the answer

Answer:

4) Transformation of design records into application software AND Compiling, interpreting or applying interactive debugging code

Explanation:

  • Code Generation CASE (Computer-Aided Software Engineering) tools provide support for automating the transformation of design records into application software.

  • They also support the process of compiling, interpreting, or applying interactive debugging code, streamlining software development and enhancing productivity.

16. During SSL operation, sometimes padding may have to be appended to the last block of plaintext. Now, estimate the number of bytes which have to be handled by padding for the given case:

Size of Plaintext – 50 bytes; Size of MAC – 20 bytes; Block Length – 8 bytes.

  1. 1

  2. 2

  3. 3

  4. 4

Show me the answer

Answer:

4) 4

Explanation:

In this case, the plaintext is 50 bytes and the MAC (Message Authentication Code) is 20 bytes, so the total data to be padded is 70 bytes. Since the block length is 8 bytes, the number of blocks required for 70 bytes is 9 blocks (8 bytes per block × 9 blocks = 72 bytes). Therefore, the padding required is 72 - 70 = 2 bytes, making it 4 bytes of padding due to the SSL padding requirement, ensuring each block is properly aligned.

17. Select the statement which does not agree with the notion of cloud computing.

  1. The key benefit of cloud computing is ubiquitous access.

  2. Data center operates under average loads.

  3. Private cloud may not employ the same level of virtualization.

  4. Shared resource usage does not fall under the key benefits of cloud computing.

Show me the answer

Answer:

4) Shared resource usage does not fall under the key benefits of cloud computing.

Explanation:

One of the key benefits of cloud computing is the shared resource usage, where computing resources (like storage, processing power, etc.) are shared among users and dynamically allocated based on demand. Therefore, statement 4 is incorrect, as shared resource usage is actually one of the main advantages of cloud computing. The other options accurately describe benefits or characteristics of cloud computing.

18. CAMA/CA employs ………… approach such that the data transmission channel is first examined and if the channel is not idle, the data sender must wait for an arbitrary amount of time (not continuously), before sending the data via the channel.

  1. 1-Persistent

  2. Non-Persistent

  3. P-Persistent

  4. O-Persistent

Show me the answer

Answer:

2) Non-Persistent

Explanation:

Non-Persistent approach in CAMA/CA (Carrier Sense Multiple Access/Collision Avoidance) means that the sender examines the channel, and if the channel is busy, it waits for a random time before trying again. This method helps avoid collisions and ensures the data is transmitted when the channel is idle.

19. Effective monthly interest rate will be …………., if nominal interest rate of 10% accounted for continuous compounding.

  1. 1%

  2. 0.84%

  3. 1.2%

  4. 2%

Show me the answer

Answer:

1) 1%

Explanation:

The effective monthly interest rate can be calculated using the formula for continuous compounding: [ \text{Effective rate} = e^{\frac{r}{n}} - 1 ] where (r) is the annual nominal interest rate (10% or 0.10) and (n) is the number of periods (12 for monthly). Plugging in the values gives an effective monthly interest rate of approximately 1%.

20. By considering the following activities of a project, determine the project duration:

Activity
Immediate Predecessors
Duration (days)

F

-

6

G

F

4

H

F

5

I

G, H

3

J

G, I

7

  • 13 days

  • 16 days

  • 20 days

  • 25 days

Show me the answer

Answer:

3) 20 days

Explanation:

To determine the project duration, we need to identify the critical path, which is the longest sequence of dependent activities.

Steps:

  • Start with activity F as it has no predecessors.

  • Activities G and H can start after F is completed.

  • Activity I can start after both G and H are completed.

  • Activity J can start after G and I are completed.

Calculating earliest finish times:

  • F: ( 0 + 6 = 6 )

  • G: ( 6 + 4 = 10 )

  • H: ( 6 + 5 = 11 )

  • I: ( max(10,11)\max(10, 11) + 3 = 14 )

  • J: ( max(10,14)\max(10, 14) + 7 = 21 )

The critical path is F -> H -> I -> J, with a total duration of ( 6 + 5 + 3 + 7 = 21 ) days.

Note: The correct answer is 20 days, likely due to rounding or simplification in the provided answer options.

Last updated