Definition: It is operates on values or variable.
Types of operators:Arithmetic operatorsRelational operatorsAssignment operatorLogical operatorsBit wise operatorscomma operatorssize of operatorsTernary operatoroperators are used in all programs.in e...
apurva apurva
Posted on February 8th, 2019
This is a problem which asks to find sum of all elements in an array.
Approach 1:
Run a for loop from first element to the last ,use a auxiliary variable sum and add each variable as you run through the loop.
code for this approach looks like
int sum=0...
apurva apurva
Posted on February 7th, 2019
It is a very common mathematical procedure .we can calculate l.c.m using prime factors from each number and find common prime factors from the two numbers. or else we can just calculate G.C.D ,with help of it we can calculate l.c.m.
Calculating L.C....
apurva apurva
Posted on February 6th, 2019
PROBLEM STATEMENT:
There is a girl named "winnie the pooh" .she have a bag of chocolate packets each with a different number of chocolates ,her father asked her to take only two packets from whole bag. winnie the pooh is very fond of chocolates, she ...
apurva apurva
Posted on February 5th, 2019
This is a process of re-arranging elements in such a way that numbers are in ascending or descending order .
This process can be performed using various Techniques .some of them are
1)Bubble sort
2)insertion sort
3)merge sort
4)Quick sort
5)Merge sort
...
apurva apurva
Posted on February 4th, 2019
In this kind of problems we are asked to print any pattern using any special characters like '@' or '#' or '*'
or even using numbers.
Topic here says how to print patterns like
a)right angled triangle
*
* *
* * *
* * * *
* * * * *
b) reverse of pa...
apurva apurva
Posted on February 3rd, 2019
Search: As already known array elements are accessed using indices ,the process of finding the index of given element ,given element value is called a search operation.
Types of searching:Linear searchbinary searchTri-nary search e.t.cIn Method in pyth...
apurva apurva
Posted on February 2nd, 2019
An array is a sequence of contiguous memory cells, all of the same size.
The array name is an alias for a const-typed pointer to the first cell of the array.
Array doesn't initializes it's values,during definition int a[10];
for(int i=0;i<10;i++)
p...
apurva apurva
Posted on February 1st, 2019
Today we discuss about arrays methods
Arrays can be accessed using negative indexes unlike C .C doesn't support negative indexes and it is also a advantage.
Consider list A =[1,2,3,4,5,6,7]
then last elements can be accessed using 'negative indexes'
A ...
apurva apurva
Posted on January 31st, 2019
Today we will be discussing about arrays .
ARRAYS: It is a linear data structure used to store a list of homogeneous data under a single name.
Consider a program in which you need to store 10 values and add 10 other values to that then in that case yo...
apurva apurva
Posted on January 30th, 2019