0% found this document useful (0 votes)
9 views3 pages

238 Assignment

Assignment

Uploaded by

nancygenaigdg24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

238 Assignment

Assignment

Uploaded by

nancygenaigdg24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment 1 RA2211003011238

C Programming

1.

2.

When you mul ply these two integers, the result (6,000,000) exceeds the maximum value of a 32-bit
signed integer, causing integer overflow. This results in an incorrect value being stored in z.

3.

The statement doesn't work because the second argument to the strcat func on must be a string,
not a single character.

4.

The sizeof operator provides the size of the array in bytes. By dividing the total size of the array by
the size of one element, you can calculate the number of elements.

C++ Programming

1.

The output will be

Explana on- The code creates a class `Sample` with a dynamically allocated integer (`ptr`), but lacks a
deep copy constructor, causing a **double delete** when a copy of the object is passed to
`SomeFunc`, leading to **undefined behavior**. To fix it, implement a deep copy constructor to
ensure each object manages its own memory safely.

2.

The parameter added to every non-sta c member func on when it is called is this.

 this is an implicit pointer to the current object, represen ng the instance on which the
member func on is called.

 It allows access to the object's non-sta c members and methods.


Technical Ques ons

Data Structures

1. What is a data structure?


A data structure is a way of organizing and storing data efficiently to perform opera ons like
inser on, dele on, and retrieval effec vely.

2. List out the areas in which data structures are applied extensively.
Data structures are extensively used in algorithms, databases, compilers, networking,
ar ficial intelligence, opera ng systems, and more.

Unix

1. How are devices represented in UNIX?


In UNIX, devices are represented as files in the /dev directory, where each device file
corresponds to a hardware device or so ware interface.

2. What is 'inode'?
An inode is a data structure used in UNIX file systems to store informa on about a file, such
as its size, owner, permissions, and loca on on the disk.

DBMS

1. What is a database?
A database is a collec on of structured data that is stored and managed in a way that allows
efficient access, modifica on, and retrieval.

2. What is a key? What are different keys in a database?


A key is an a ribute or a set of a ributes used to uniquely iden fy records in a database.
Types of keys include:

o Primary Key

o Foreign Key

o Candidate Key

o Unique Key

Opera ng System

1. Explain the concept of Reentrancy.


Reentrancy refers to the ability of a func on or program to be interrupted in the middle of
execu on and safely called again before the previous execu ons are finished.

2. Explain Belady's Anomaly.


Belady's Anomaly is a situa on in which increasing the number of page frames in a virtual
memory system results in an increase in the number of page faults, which is counterintui ve.

SQL

1. Which is the subset of SQL commands used to manipulate Oracle Database structures,
including tables?
The subset is Data Defini on Language (DDL), which includes commands like CREATE, ALTER,
and DROP.

2. What operator performs pa ern matching?


The LIKE operator performs pa ern matching in SQL.

Computer Networks

1. What are the two types of transmission technology available?


The two types are Serial transmission (data is sent one bit at a me) and Parallel
transmission (mul ple bits are sent simultaneously).

You might also like