Search for notes by fellow students, in your own course and all over the country.

Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.

My Basket

You have nothing in your shopping cart yet.

Title: DSA
Description: ..

Document Preview

Extracts from the notes are below, to see the PDF you'll receive please use the links above


Lecture 5: Bitwise Operators, For Loops, Operator
Precedence & Variable Scoping
This is the lecture number 5 of our DSA series
...
We solved 18+ pattern questions in the previous
lecture
...

You will learn a lot in this lecture
...
For finding 2 's compliment , first we have to find 1 's
complement and then add 1 to it So we got our answer as -3 Got it Bhaiya says
...
We will talk about left shift and right shift operators
...
For smaller numbers we will get our answer
as 2 * n But in some cases it creates negative numbers This is your left shift
operator
...

Bhaiya: What does post increment mean i++ It means that first use the value and
then increment it by 1 Let 's see with an example If i=4 and I write it as int a = i++
Now let 's check what are the values of ' a ' and ' i' Post increment means ,
increment after using , so it means ' a will be having the old value of i which is 4 in
this case and i ' is incremented after this operation , it means i is 5 now Got ? You
must seen the 5 questions and you have to tell the output in the comment section
...
You can simply
write this also for ( ; ; ) You should also play with these operators because they are
very easy and are asked in MCQs
...
If condition is true, then you execute all statements inside
it
...

Bhaiya: To find that this n is prime or not, we use to divide it by all numbers from 1
to N
...
If we get n % i
== 0 ( where i is any number between 1 and N ) then sum 's value to B
...

We know variables but what is this scope ? We are going to talk about the life time
of any variable and can where all we can use it We are familiar with both break and
continue
...
We came
to know that it is a not a prime number
...
If I will redeclare B twice in the same

block , then I will get this error
...
Operator precedence table increases from bottom to top and left to right
...
We have to run the
loop until the N is 0 in rem =n % 10 in rem
...
In this video, we
talked about operators, For loop, precedence, precedence and variable scope
...
But if you want to do those questions, then I will list down them here ,
you can solve them
...
We will meet in the next video where we will solve these
questions
...
Will see you in next one , till then , Bye
Title: DSA
Description: ..