0% found this document useful (0 votes)
22 views76 pages

Set-1 Pyq - 2023

Rajan Computer Academy offers various training and placement programs for students in fields like BCA, B. Tech (CS), and MCA. The document covers fundamental programming concepts such as literals, function overloading, polymorphism, and data structures, along with types of inheritance and networking. It also outlines different data models used in data management, including relational, network, and hierarchical models.

Uploaded by

meghamannatgupta
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)
22 views76 pages

Set-1 Pyq - 2023

Rajan Computer Academy offers various training and placement programs for students in fields like BCA, B. Tech (CS), and MCA. The document covers fundamental programming concepts such as literals, function overloading, polymorphism, and data structures, along with types of inheritance and networking. It also outlines different data models used in data management, including relational, network, and hierarchical models.

Uploaded by

meghamannatgupta
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/ 76

Rajan Computer Academy

11th & 12th (JAC & CBSE) | ADCA+ (Placement Course)


BCA, B. Tech (CS) & MCA Training & Placement Program

A person in a suit

Description automatically generated


9034683497

Youtube link - https://www.youtube.com/@rajancomputeracademy


Branch 1 – Annanda chowk(Hazaribag)
Branch-2 – Babugaon-Korrah Chowk Road (Hazaribag)
1) Bajrena Stroustrop
2) a) it is used to copy string from one variable to another variable
b) it is used to convert upper case to lower case in C ++
5) function overloading is a powerful concept in C ++. it is used
when two or more than two function exist in C ++ with same name
is called function overloading.
A text communication via keyboard in real time between two or
more than two users on local network over the Internet is called
chatting.
8)
Ans.- Literals are constant values assigned to variables.
Literals represent fixed values that cannot be modified.
Literals are the type of representation of Boolean data,
character data, numeric data, or string data, a medium of
expressing particular values in the program.
Ex- int a=10; (here 10 is literal)
There are 5 types of literals
i) Integer Constant
ii) Characters Constant
iii) Floating Constant
iv) String Constant
1. Interger Constant
• Number without decimal point
• It may be +ve, -ve and 0.
• Ex – 5,9,6,4,7,895,-9,-856 etc
2. Character constant
• Single character within single quote.
• Ex- ‘a’, ‘A’, ‘7’
3. Floating constant(Real Constant)
• The number having fractional part is called floating constant or real constant.
• Ex- 6.2, -6.9, 152E05
0.6E09,1.8E08 etc.
4. String Constant
• Multiple character are under double inverted comma.
• Ex- “Ram”, “JAC Ranchi”, “Jharkhand”
• Size of one character is 1 byte but in case of string it consume more one byte than its
no.
Objective Oriented Programming Procedural Programming
1. Follows an Class & object-based approach 1. Follows a procedural approach
2. Divides programs into objects and classes 2. Divides programs into functions and
3. Data is encapsulated within objects procedures.
3. Data is stored in variables and
manipulated using functions.
4. Provides data hiding (Encapsulation). 4. No data hiding, data is accessible
throughout the program
5. Encourages code reuse using inheritance and 5. Code reuse is limited to function calls
polymorphism.
6. C++, Java, Python (OOP-based) 6. C, BASIC, Fortran
10. What is polymorphism give an example in C++ to show its
implementation. 3M
Polymorphism(Poly – Many , Morphism- Form)
• Polymorphism is the ability of a message, object or
code to take more than one form.
• Real life example - a person can have more than one
form like a person can be a father via employee can
be a traveller can be a businessman can be a
husband simultaneously, but this person have
different behavior at different places like in office he
will so sincerity and discipline, at home he will be
like live like chill and casual approach like this he
helped different different behavior at different
places is known as polymorphism.
• Polymorphism is implemented
in two ways
i) Compile time polymorphism
in which function overloading
is used.
ii) Runtime polymorphism in
which function over ridding is
used and virtual function is
also used.
Constructor Destructor
1. A special member function that initializes an 1. A special member function that is called
object when it is created. when an object is destroyed.
2. Has the same name as the class. 2. Has the same name as the class but with
a ~ (tilde) prefix.
3. Called automatically when an object is 3. Called automatically when an object is
created. destroyed.
4. Can have parameters (Parameterized 4. Cannot have parameters (No arguments
Constructor). allowed).
5. Can be overloaded (Multiple constructors in a 5. Cannot be overloaded (Only one
class). destructor per class).
6. Initializes object properties and allocates 6. Cleans up resources before the object is
resources. removed from memory.
7. Can be explicitly called using object 7. Cannot be explicitly called; it is invoked
initialization. automatically.
Four Important Operations Associated with Data Structures are
1.Insertion
2.Deletion
3.Searching
4.Traversal

1. Insertion
Insertion is the process of adding a new element to a data structure. The
position where the element is inserted depends on the type of data structure.
Example:
•In an array, an element can be inserted at the beginning, end, or a specific
index.
•In a linked list, a new node can be inserted at the head, tail, or in between.
2. Deletion
Deletion is the process of removing an element from a data structure. The
position of the element to be deleted depends on the structure type.
Example:
•In an array, deletion shifts elements after the removed one.
•In a linked list, a node is removed by adjusting pointers.
3. Searching
Searching is the process of finding an element in a data structure.
Types of Searching:
•Linear Search – Sequentially checks each element.
•Binary Search – Efficient search on sorted data using divide-and-conquer.
Traversal
Traversal is the process of visiting and processing each element in a data
structure.
Example: -n an array, traversal is done using loops.
•In a linked list, traversal moves from the head node to the last node.
Different Data Models
A data model defines how data is organized, stored, and managed in a database.
Different data models represent data in different ways.

there are three data models that are used in data management are
1)Relational data model 2) Network data model 3) Hierarchical data model

Relational Data Model


The Relational Data Model is a way to
structure and organize data into tables,
called relations,
Network Data Model
The Network Data Model is a database model is used to represent more complex relationships
among data than the hierarchical model,
Hierarchical Data Model
The Hierarchical Data Model is one of the earliest database models that
organizes data in a tree-like structure, where each record has a single parent and
potentially many children.
Inheritance
Inheritance is the capability of a class to inherit properties(data member and
methods) from
another class.

Different Form of inheritance


• Single
• Multiple
• Hierarchical
• Multi-level
• Hybrid
1) Single inheritance : - when a subclass
inherits only from one base class it is known
as single inheritance second.

2) Multiple inheritance:- when a subclass


inherits from multiple based classes it is known
as multiple inheritance.

3) Hierarchical inheritance :- when many sub


classes inherit from a single base class it is
known as hierarchical inheritance.
4) Multilevel inheritance :- the transitive nature of
inheritance is reflected by this form of inheritance
from a class that itself in head from another class it is
known as a multilevel inheritance

5) Hybrid inheritance :- Hybrid Inheritance is a


technique which combines multiple types of
inheritance to create a sub class called multiple
inheritance.
Ans - Network is the interconnection of computers and devices to share data,
resources, and applications
Types of network

There are four types of computer network on the basis of geography.


• Local area network(LANs)
• Metropolitan area network(MANs)
• Wide area network(WANs)
• Personal area network(PAN)

Local Area Network(LANs)


small computer networks that are spread to a localized area (an office , a building or a factory)
are known as local area network
Metropolitan area network(MANs)
The network it is spread over a city is called metropolitan area network like cable TV network
Because of this network is to sharing of hardware and software resources among its users
Wide Area Network (WAN)

The network which is spread across the country is known as wide area network. It can be
group of LAN or MAN.
Personal area network(PAN)
The network which is a spread within the home only the range of about 10m for the
individual person is known as personal area network

You might also like