SlideShare a Scribd company logo

How do arrays compare with variables and how do they differ- Give a si.docx

T
tpaula2

How do arrays compare with variables and how do they differ? Give a simple example (Programming Logic and Design) Solution Arrays : Array is a homogeneous (same kind of elements) collection of elements in memory in a contagious locations. The first element of array is stored at index =0 and last element is stored at index=size-1. For example, int marks [5] ={10,20,30,40,50}; 10 20 30 40 50 Variable : The variable is a name given to memory location in a computer memory. The element is stored in that memory location can be pointed by the variable name. For example, int id=10; Where id is a name given to the memory location where the value 10 is stored. Comparison of array elements with variables : Since arrays are stored index based, the elements are compared using index location of the element in an array. int min=50; for(int i=0;i<5;i++) //comparison of array element with variable, min if(marks[index]==min) //code follows .

1 of 2
Download to read offline
How do arrays compare with variables and how do they differ? Give a simple example
(Programming Logic and Design)
Solution
Arrays : Array is a homogeneous (same kind of elements) collection of elements in memory in a
contagious locations.
The first element of array is stored at index =0 and last element is stored at index=size-1.
For example, int marks [5] ={10,20,30,40,50};
10
20
30
40
50
Variable : The variable is a name given to memory location in a computer memory. The element
is stored in that memory location can be pointed by the variable name.
For example, int id=10;
Where id is a name given to the memory location where the value 10 is stored.
Comparison of array elements with variables :
Since arrays are stored index based, the elements are compared using index location of the
element in an array.
int min=50;
for(int i=0;i<5;i++)
//comparison of array element with variable, min
if(marks[index]==min)
//code follows
10 20 30 40 50

Recommended

DSA UNIT II ARRAY AND LIST - notes
DSA UNIT II ARRAY AND LIST - notesDSA UNIT II ARRAY AND LIST - notes
DSA UNIT II ARRAY AND LIST - notesswathirajstar
 
One dimensional arrays
One dimensional arraysOne dimensional arrays
One dimensional arraysSatyam Soni
 
Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm Arrays in Data Structure and Algorithm
Arrays in Data Structure and Algorithm KristinaBorooah
 
Arrays in C++ in Tamil - TNSCERT SYLLABUS PPT
Arrays in C++ in Tamil - TNSCERT SYLLABUS PPT Arrays in C++ in Tamil - TNSCERT SYLLABUS PPT
Arrays in C++ in Tamil - TNSCERT SYLLABUS PPT LATHA LAKSHMI
 
9781439035665 ppt ch09
9781439035665 ppt ch099781439035665 ppt ch09
9781439035665 ppt ch09Terry Yoast
 
datastructureppt-190327174340 (1).pptx
datastructureppt-190327174340 (1).pptxdatastructureppt-190327174340 (1).pptx
datastructureppt-190327174340 (1).pptxDEEPAK948083
 

More Related Content

Similar to How do arrays compare with variables and how do they differ- Give a si.docx

Similar to How do arrays compare with variables and how do they differ- Give a si.docx (20)

Data structure array
Data structure  arrayData structure  array
Data structure array
 
Data structure ppt
Data structure pptData structure ppt
Data structure ppt
 
Data structures in c#
Data structures in c#Data structures in c#
Data structures in c#
 
1 D Arrays in C++
1 D Arrays in C++1 D Arrays in C++
1 D Arrays in C++
 
Data structure.pptx
Data structure.pptxData structure.pptx
Data structure.pptx
 
arrays.pptx
arrays.pptxarrays.pptx
arrays.pptx
 
Lecture 15 - Array
Lecture 15 - ArrayLecture 15 - Array
Lecture 15 - Array
 
Array
ArrayArray
Array
 
DSA Unit II array.pptx
DSA Unit II array.pptxDSA Unit II array.pptx
DSA Unit II array.pptx
 
Chapter 13.pptx
Chapter 13.pptxChapter 13.pptx
Chapter 13.pptx
 
Learn Java Part 8
Learn Java Part 8Learn Java Part 8
Learn Java Part 8
 
1st lecture.ppt
1st lecture.ppt1st lecture.ppt
1st lecture.ppt
 
C++ arrays part1
C++ arrays part1C++ arrays part1
C++ arrays part1
 
Arrays in JAVA.ppt
Arrays in JAVA.pptArrays in JAVA.ppt
Arrays in JAVA.ppt
 
02 arrays
02 arrays02 arrays
02 arrays
 
DATA STRUCTURE CLASS 12 COMPUTER SCIENCE
DATA STRUCTURE CLASS 12 COMPUTER SCIENCEDATA STRUCTURE CLASS 12 COMPUTER SCIENCE
DATA STRUCTURE CLASS 12 COMPUTER SCIENCE
 
Data Structure.pptx
Data Structure.pptxData Structure.pptx
Data Structure.pptx
 
OOPs with java
OOPs with javaOOPs with java
OOPs with java
 
Aj unit2 notesjavadatastructures
Aj unit2 notesjavadatastructuresAj unit2 notesjavadatastructures
Aj unit2 notesjavadatastructures
 
DS Complete notes for Computer science and Engineering
DS Complete notes for Computer science and EngineeringDS Complete notes for Computer science and Engineering
DS Complete notes for Computer science and Engineering
 

More from tpaula2

How can I calculate the missing amounts for each of the independent ca.docx
How can I calculate the missing amounts for each of the independent ca.docxHow can I calculate the missing amounts for each of the independent ca.docx
How can I calculate the missing amounts for each of the independent ca.docxtpaula2
 
How do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docx
How do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docxHow do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docx
How do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docxtpaula2
 
How do --per capita-- considerations affect a company-'s decision to e.docx
How do --per capita-- considerations affect a company-'s decision to e.docxHow do --per capita-- considerations affect a company-'s decision to e.docx
How do --per capita-- considerations affect a company-'s decision to e.docxtpaula2
 
How do I calculate the limiting reagent and percent yield for creating.docx
How do I calculate the limiting reagent and percent yield for creating.docxHow do I calculate the limiting reagent and percent yield for creating.docx
How do I calculate the limiting reagent and percent yield for creating.docxtpaula2
 
How can you classify the molecular structures of the polymers- Explain.docx
How can you classify the molecular structures of the polymers- Explain.docxHow can you classify the molecular structures of the polymers- Explain.docx
How can you classify the molecular structures of the polymers- Explain.docxtpaula2
 
How could I show that the nitrate test confirmed that two unknown solu.docx
How could I show that the nitrate test confirmed that two unknown solu.docxHow could I show that the nitrate test confirmed that two unknown solu.docx
How could I show that the nitrate test confirmed that two unknown solu.docxtpaula2
 
how can you determine if a computer is using pipelining-SolutionIn old.docx
how can you determine if a computer is using pipelining-SolutionIn old.docxhow can you determine if a computer is using pipelining-SolutionIn old.docx
how can you determine if a computer is using pipelining-SolutionIn old.docxtpaula2
 
How do changes in activity affect contribution margin and net operatin.docx
How do changes in activity affect contribution margin and net operatin.docxHow do changes in activity affect contribution margin and net operatin.docx
How do changes in activity affect contribution margin and net operatin.docxtpaula2
 
How do convert strings inside a vector to integers and then find the a.docx
How do convert strings inside a vector to integers and then find the a.docxHow do convert strings inside a vector to integers and then find the a.docx
How do convert strings inside a vector to integers and then find the a.docxtpaula2
 
How can the use of Internet search engines to locate information about.docx
How can the use of Internet search engines to locate information about.docxHow can the use of Internet search engines to locate information about.docx
How can the use of Internet search engines to locate information about.docxtpaula2
 
How can the forms of business organizations impact the control of the.docx
How can the forms of business organizations impact the control of the.docxHow can the forms of business organizations impact the control of the.docx
How can the forms of business organizations impact the control of the.docxtpaula2
 
how can i store 30 prices on this void get prices and save it to the a.docx
how can i store 30 prices on this void get prices and save it to the a.docxhow can i store 30 prices on this void get prices and save it to the a.docx
how can i store 30 prices on this void get prices and save it to the a.docxtpaula2
 
How can a company assess person-job fit before hiring employees What a.docx
How can a company assess person-job fit before hiring employees What a.docxHow can a company assess person-job fit before hiring employees What a.docx
How can a company assess person-job fit before hiring employees What a.docxtpaula2
 
How can biometric technology be used to fight cybercrime and cyber rel.docx
How can biometric technology be used to fight cybercrime and cyber rel.docxHow can biometric technology be used to fight cybercrime and cyber rel.docx
How can biometric technology be used to fight cybercrime and cyber rel.docxtpaula2
 
How can CORS be used to exploit the following password reset page- The.docx
How can CORS be used to exploit the following password reset page- The.docxHow can CORS be used to exploit the following password reset page- The.docx
How can CORS be used to exploit the following password reset page- The.docxtpaula2
 
How are encryption- authentication- digital signatures- and digital ce.docx
How are encryption- authentication- digital signatures- and digital ce.docxHow are encryption- authentication- digital signatures- and digital ce.docx
How are encryption- authentication- digital signatures- and digital ce.docxtpaula2
 
How are cash equivalents treated on a statement of cash flows- They ar.docx
How are cash equivalents treated on a statement of cash flows- They ar.docxHow are cash equivalents treated on a statement of cash flows- They ar.docx
How are cash equivalents treated on a statement of cash flows- They ar.docxtpaula2
 
home - study - science - physics - physics questions and answers - an.docx
home - study - science - physics - physics questions and answers - an.docxhome - study - science - physics - physics questions and answers - an.docx
home - study - science - physics - physics questions and answers - an.docxtpaula2
 
HOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docx
HOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docxHOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docx
HOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docxtpaula2
 
Horizontal Analysis The comparative accounts payable and long-term deb.docx
Horizontal Analysis The comparative accounts payable and long-term deb.docxHorizontal Analysis The comparative accounts payable and long-term deb.docx
Horizontal Analysis The comparative accounts payable and long-term deb.docxtpaula2
 

More from tpaula2 (20)

How can I calculate the missing amounts for each of the independent ca.docx
How can I calculate the missing amounts for each of the independent ca.docxHow can I calculate the missing amounts for each of the independent ca.docx
How can I calculate the missing amounts for each of the independent ca.docx
 
How do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docx
How do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docxHow do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docx
How do COQ and capability relate-SolutionBorn 130 years ago- Le coq sp.docx
 
How do --per capita-- considerations affect a company-'s decision to e.docx
How do --per capita-- considerations affect a company-'s decision to e.docxHow do --per capita-- considerations affect a company-'s decision to e.docx
How do --per capita-- considerations affect a company-'s decision to e.docx
 
How do I calculate the limiting reagent and percent yield for creating.docx
How do I calculate the limiting reagent and percent yield for creating.docxHow do I calculate the limiting reagent and percent yield for creating.docx
How do I calculate the limiting reagent and percent yield for creating.docx
 
How can you classify the molecular structures of the polymers- Explain.docx
How can you classify the molecular structures of the polymers- Explain.docxHow can you classify the molecular structures of the polymers- Explain.docx
How can you classify the molecular structures of the polymers- Explain.docx
 
How could I show that the nitrate test confirmed that two unknown solu.docx
How could I show that the nitrate test confirmed that two unknown solu.docxHow could I show that the nitrate test confirmed that two unknown solu.docx
How could I show that the nitrate test confirmed that two unknown solu.docx
 
how can you determine if a computer is using pipelining-SolutionIn old.docx
how can you determine if a computer is using pipelining-SolutionIn old.docxhow can you determine if a computer is using pipelining-SolutionIn old.docx
how can you determine if a computer is using pipelining-SolutionIn old.docx
 
How do changes in activity affect contribution margin and net operatin.docx
How do changes in activity affect contribution margin and net operatin.docxHow do changes in activity affect contribution margin and net operatin.docx
How do changes in activity affect contribution margin and net operatin.docx
 
How do convert strings inside a vector to integers and then find the a.docx
How do convert strings inside a vector to integers and then find the a.docxHow do convert strings inside a vector to integers and then find the a.docx
How do convert strings inside a vector to integers and then find the a.docx
 
How can the use of Internet search engines to locate information about.docx
How can the use of Internet search engines to locate information about.docxHow can the use of Internet search engines to locate information about.docx
How can the use of Internet search engines to locate information about.docx
 
How can the forms of business organizations impact the control of the.docx
How can the forms of business organizations impact the control of the.docxHow can the forms of business organizations impact the control of the.docx
How can the forms of business organizations impact the control of the.docx
 
how can i store 30 prices on this void get prices and save it to the a.docx
how can i store 30 prices on this void get prices and save it to the a.docxhow can i store 30 prices on this void get prices and save it to the a.docx
how can i store 30 prices on this void get prices and save it to the a.docx
 
How can a company assess person-job fit before hiring employees What a.docx
How can a company assess person-job fit before hiring employees What a.docxHow can a company assess person-job fit before hiring employees What a.docx
How can a company assess person-job fit before hiring employees What a.docx
 
How can biometric technology be used to fight cybercrime and cyber rel.docx
How can biometric technology be used to fight cybercrime and cyber rel.docxHow can biometric technology be used to fight cybercrime and cyber rel.docx
How can biometric technology be used to fight cybercrime and cyber rel.docx
 
How can CORS be used to exploit the following password reset page- The.docx
How can CORS be used to exploit the following password reset page- The.docxHow can CORS be used to exploit the following password reset page- The.docx
How can CORS be used to exploit the following password reset page- The.docx
 
How are encryption- authentication- digital signatures- and digital ce.docx
How are encryption- authentication- digital signatures- and digital ce.docxHow are encryption- authentication- digital signatures- and digital ce.docx
How are encryption- authentication- digital signatures- and digital ce.docx
 
How are cash equivalents treated on a statement of cash flows- They ar.docx
How are cash equivalents treated on a statement of cash flows- They ar.docxHow are cash equivalents treated on a statement of cash flows- They ar.docx
How are cash equivalents treated on a statement of cash flows- They ar.docx
 
home - study - science - physics - physics questions and answers - an.docx
home - study - science - physics - physics questions and answers - an.docxhome - study - science - physics - physics questions and answers - an.docx
home - study - science - physics - physics questions and answers - an.docx
 
HOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docx
HOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docxHOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docx
HOME -NSERI PAGE LAYOUT FORMULAS DATA REVEW VIPw Cut Copy Farnat Paint.docx
 
Horizontal Analysis The comparative accounts payable and long-term deb.docx
Horizontal Analysis The comparative accounts payable and long-term deb.docxHorizontal Analysis The comparative accounts payable and long-term deb.docx
Horizontal Analysis The comparative accounts payable and long-term deb.docx
 

Recently uploaded

Permeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemPermeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemchetanpatil2572000
 
Odontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptxOdontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptxMennat Allah Alkaram
 
Unit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdfUnit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdfSUMIT TIWARI
 
Mycobacteriology update 2024 Margie Morgan.ppt
Mycobacteriology update 2024 Margie Morgan.pptMycobacteriology update 2024 Margie Morgan.ppt
Mycobacteriology update 2024 Margie Morgan.pptMargie Morgan
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
Google Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdfGoogle Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdfTechSoup
 
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...liera silvan
 
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTSA TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTSDr.M.Geethavani
 
Add Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 SalesAdd Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 SalesCeline George
 
A LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdf
A LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdfA LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdf
A LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdfDr.M.Geethavani
 
Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...Association for Project Management
 
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...AKSHAYMAGAR17
 
BIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptx
BIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptxBIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptx
BIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptxRAVEESHAD
 
How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17Celine George
 
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfSSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfMohonDas
 
Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...Sue Beckingham
 
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.Florence Dayana
 
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...AKSHAYMAGAR17
 
Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Association for Project Management
 
Mycology Update February 2024 Microbes with Morgan
Mycology Update February 2024 Microbes with MorganMycology Update February 2024 Microbes with Morgan
Mycology Update February 2024 Microbes with MorganMargie Morgan
 

Recently uploaded (20)

Permeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery systemPermeation enhancer of Transdermal drug delivery system
Permeation enhancer of Transdermal drug delivery system
 
Odontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptxOdontogenesis and its related anomiles.pptx
Odontogenesis and its related anomiles.pptx
 
Unit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdfUnit 5th topic Drugs used in congestive Heart failure and shock.pdf
Unit 5th topic Drugs used in congestive Heart failure and shock.pdf
 
Mycobacteriology update 2024 Margie Morgan.ppt
Mycobacteriology update 2024 Margie Morgan.pptMycobacteriology update 2024 Margie Morgan.ppt
Mycobacteriology update 2024 Margie Morgan.ppt
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
Google Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdfGoogle Ad Grants Services at TechSoup.pdf
Google Ad Grants Services at TechSoup.pdf
 
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
EmpTech Lesson 7 - Online Creation Tools, Platforms, and Applications for ICT...
 
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTSA TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
A TEXTBOOK OF INTELLECTUAL ROPERTY RIGHTS
 
Add Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 SalesAdd Products From Catalog in Odoo 17 Sales
Add Products From Catalog in Odoo 17 Sales
 
A LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdf
A LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdfA LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdf
A LABORATORY MANUAL FOR ORGANIC CHEMISTRY.pdf
 
Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...Successful projects and failed programmes – the cost of not designing the who...
Successful projects and failed programmes – the cost of not designing the who...
 
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
Ideotype concept and climate resilient crop varieties for future- Wheat, Rice...
 
BIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptx
BIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptxBIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptx
BIOCHEMICAL PROPERTIES OF WATER .Raveesh.pptx
 
How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17How To Create Record Rules in the Odoo 17
How To Create Record Rules in the Odoo 17
 
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdfSSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
SSC Hindu Religion and Moral Education MCQ Solutions 2024.pdf
 
Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...Digital Footprints to Career Pathways - Building a Strong Professional Online...
Digital Footprints to Career Pathways - Building a Strong Professional Online...
 
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdfDr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
Dr.M.Florence Dayana-Cloud Computing-unit - 4.pdf
 
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
Genetics, Heredity, Variation, history, its roles, Scope, Importance, and Bra...
 
Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...Discussing the new Competence Framework for project managers in the built env...
Discussing the new Competence Framework for project managers in the built env...
 
Mycology Update February 2024 Microbes with Morgan
Mycology Update February 2024 Microbes with MorganMycology Update February 2024 Microbes with Morgan
Mycology Update February 2024 Microbes with Morgan
 

How do arrays compare with variables and how do they differ- Give a si.docx

  • 1. How do arrays compare with variables and how do they differ? Give a simple example (Programming Logic and Design) Solution Arrays : Array is a homogeneous (same kind of elements) collection of elements in memory in a contagious locations. The first element of array is stored at index =0 and last element is stored at index=size-1. For example, int marks [5] ={10,20,30,40,50}; 10 20 30 40 50 Variable : The variable is a name given to memory location in a computer memory. The element is stored in that memory location can be pointed by the variable name. For example, int id=10; Where id is a name given to the memory location where the value 10 is stored. Comparison of array elements with variables : Since arrays are stored index based, the elements are compared using index location of the element in an array. int min=50;
  • 2. for(int i=0;i<5;i++) //comparison of array element with variable, min if(marks[index]==min) //code follows 10 20 30 40 50