Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Thesis

Data structure & algorithms (DSA)

Rating
-
Sold
-
Pages
1
Grade
A+
Uploaded on
24-02-2023
Written in
2022/2023

This is the 2nd lecture of our DSA series. We will see how a program runs and what does each line mean in this lecture. This is how the compilation process work So it is compiler which makes it possible for us to run a source code. Coding Ninjas has supported us in providing this amazing DSA course to you. Courses are available in both Hindi and English. you need an IDE to write, run and execute a code. There are many IDEs out there - CodeBlocks, VsCode and many more - which you do n't even need to install Replit is one of them. You can directly create a C++ there and run it using Replit. In C++, many namespaces are there which have cout functions in them so if we want to use cout , we have to add this file to our code. We use these signs to output the result into standard namespace. If you will use by mistake by mistake, then it will give you compilation error So we use this operator to display output. We are going to talk about data types and variables. Whenever you have to story any information or data in the memory. You have to mention what type of data it is and how much memory it will take. For eg- int a = 5, a is a variable in memory which is of int type and it has value 5 in it. We have certain rules which we have to follow when we are giving names. There is a function named sizeof , which will tell you about the space being used by any variable. In memory, first 29 bits will have 0, and last 3 bits will be 101, so in memory the first 29 bit will have 0 and the last 3bits will have 101. We have a way to story multiple characters but we will see that in upcoming lectures. In c++, all the characters are mapped to some ASCII value in memory. We will just store binary form of ASCII value of any character. If we have 4 different bytes with some binary value, how will compiler know whether it is a single Int value of 4 separate char values ? Compiler will come to know from data types which we used when we declared any variable. This process of converting one data type into another is known as type casting. There are few steps which I have to follow while storing a negative number. Let 's say the number is -5 1st - Ignore the negative sign 2nd - Convert into binary representation = 101 3rd - Take 2 's complement and store it Now we can store negative numbers simply too, by just using their first bit as their sign. With this our maximum value will be limited to 2^31 -1 instead of 2^32 -1. 2/5 will give 0 and not 0. 4 , why ? because you are storing your answer in a int variable. To get answer in float, store it in a float variable. If you want to check whether A is equal to B or not I can do that using this ( a==b ) relational operators = , , , ! = is an assignment operator, because we are assigning 3 to a. logical operators have & & and & is used to check multiple conditions. We have got the basic idea of operators. We know what things to keep in mind while dividing , how to store negative numbers & & operators and ! operators. Now let 's move ahead towards bitwise operators I will teach these when we will use them in upcoming sessions. We will do Bitwise operators later.

Show more Read less
Institution
Course

Content preview

Paste Youtube Video URL here Summarize




We will learn about flow charts,
pseudocode and programming
languages. We will also learn about
programming languages and why do we
use them. After this, we will write our
program. This will be our flow whenever
we will solve any problem. First question,
then given values, then approach and at
last we will code it. Bhaiya explains what
is a flowchart is a diagramatic approach
of that approach known as flow chart.
The flow chart constitute various
components, connected with each other
Bhaiyan says. He says that from where a
program is starting we have a component
called terminator. Terminator is used to
show the start and end start of the
program. Next block is a simple
rectangle, which shows a process. Bhaiya

Written for

Course

Document information

Uploaded on
February 24, 2023
Number of pages
1
Written in
2022/2023
Type
THESIS
Supervisor(s)
Lokesh chhabada
Year
Unknown

Subjects

$9.19
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
lokeshchhabada

Get to know the seller

Seller avatar
lokeshchhabada Mansarovar Global university
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions