Procedural Oriented Programming | Object Oriented Programming |
---|---|
In procedural programming, program is divided into small parts called functions. Example code : #include <stdio.h> /*this function computes the absolute value of a whole number.*/ int abs(int x) { if (x>=0) return x; else return -x; } /*this program calls the abs() function defined above twice.*/ int main() { int x, printf(” x=”); scanf(“%d”, &x); printf(“Absolute Value of x is %d. \n”, abs(x)); return 0; } | In object oriented programming, program is divided into small parts called objects. Example code : class Parrot: # class attribute species = "bird" # instance attribute def __init__(self, name, age): self.name = name self.age = age instantiate the Parrot class blu = Parrot(“Blu”, 10) woo = Parrot(“Woo”, 15) access the class attributes print(“Blu is a {}”.format(blu.class.species)) print(“Woo is also a {}”.format(woo.class.species)) access the instance attributes print(“{} is {} years old”.format( blu.name, blu.age)) print(“{} is {} years old”.format( woo.name, woo.age)) |
Procedural programming follows top down approach. Note: A top-down approach is essentially the breaking down of a program to gain insight into its compositional small program (or module) in a reverse engineering fashion. | Object oriented programming follows bottom up approach. Note : A bottom-up approach is the piecing together of module (or small program) to give rise to more complex program, thus making the original modules of the emergent program. |
There is no access specifier in procedural programming. | Object oriented programming have access specifiers like private, public, protected etc. |
Adding new data and function is not easy. | Adding new data and function is easy. |
Procedural programming does not have any proper way for hiding data so it is less secure. | Object oriented programming provides data hiding so it is more secure. |
In procedural programming, overloading is not possible. | Overloading is possible in object oriented programming. Overloading methods lets you define the same method multiple times so that you can call them with different argument lists (a method’s argument list is called its signature) |
In procedural programming, function is more important than data. | In object oriented programming, data is more important than function. |
Procedural programming is based on unreal world. | Object oriented programming is based on real world. |
Data can move freely from procedure to procedure in the system | Objects can move and communicate with each other through member functions |
Examples: C, FORTRAN, Pascal, Basic etc. | Examples: C++, Java, Python, C# etc. |
Category: Unified Cyber Olympiad Preparation
Mental Ability – Competitive Exam Preparation – Number Series by adding fixed number – NTSE, NCO, NSO, IMO and other Competitive Exams
Mental Ability – Competitive Exam Preparation – Number Series by adding fixed number – NTSE, NCO, NSO, IMO and other Competitive Exams
The sequence or series of numbers created by adding fixed number :
- 5 , 7 , 9 , 11 , 13 etc – Number sequence obtained by adding fixed number 2
- 6, 11, 16, 21, 26 etc – Number sequence obtained by adding fixed number 5
Similarly number sequence can be obtained by adding two fixed numbers alternatively or by adding two fixed numbers after repeated series. Example below:
5, 7, 10,12, 15, 17, 20 etc – This number sequence is formed by adding 2 and 3 alternatively
5, 6, 7, 9, 11, 13, 16, 19, 22 etc – This number sequence is formed by adding fixed number 1 , 2 and 3 after regular interval i.e after 3 numbers
Below is some questions to practise this. Please leave your answers in comment box on this page or write to us on abhyas.practise@gmail.com.
We will revert back with right answers at the earliest
Complete the sequence by adding fixed numbers
- 1234, 1236, 1238, _____, 1242, 1244, _____
- 1400, 1500, ______ , 1700, 1800, 1900, ______
- 3, 9, 15, _____, 27, 33, 39, ______, 51
- 8, 17, _____, 35, 44, _____, 62
- 10, 15, 25, 35, 40, 45, 55, 65, _____ , 75, 85, ______
- 6, 9, 15, 21, 24, 27, 33, ______ , 42, ______
- 3, 5, 7, 10, 13, 16, 18, 20, _____, 25, ______, 31
- 10, 20, 50, _____, 90, 100, 130, 160, _____, 180, 210, 240
- 1000, 1200, 1600,________, 2200, 2400, 2800, 3200
- 86, 96, 116, 136, 166, ______, 236, 276, 326, 376
Please like and share this post if you like this page.
Unified Cyber Olympiad 2020 – Class 2 Examination Papers – Part 5
Unified Cyber Olympiad 2020 – Class 2 Examination Papers – Part 5
CLASS : 2
Select the correct option to answer every question given below.
Class – 2 Computers
41. Select the incorrect match.

42. The mouse which has a rubber or a metal ball under its belly is known as _.
(A) Mechanical mouse (B) Optical mouse
(C) 3D mouse (D) Tactile mouse
43. Who am I ?
• I am the processing unit of a computer.
• All major activities of the computer are
coordinated by me.
44. The given images shows the use of computers in

(A) Police station (B) Bank
(C) School (D) None of these
45. By speaking into __ you can record your voice in the computer.

Class – 2 English
46. Complete spellings correctly for given pictures and match them correctly to get the complete mark.