







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








● Arrays ● Functions ● Conditional Statements ● Switch Case ● Printf/Scanf Stacks- “last in, first out” Queues- “first come, first serve” / “first in first out” Trees- “root is on top” Graphs- “relation” Maps- “routes” Sets- “collection” ➢ DATA STRUCTURE ● Data
- “raw” / “unprocessed facts”
● Size is fixed ● Di cult to insert and delete ● If capacity is more and occupancy less, most of the array gets wasted ● Needs contiguous memory to get allocated.
- Essential tools in computer science, enabling e cient data retrieval and influencing various applications and algorithms. ● LINEAR SEARCH
Examples: ➢ ACCESSING ARRAY ELEMENTS
➢ CREATING MULTI-DIMENSIONAL ARRAYS
1. Access an element in a multidimensional array: ● To access an element in a multidimensional array: ● Specify both the row index and the column index. ● The indices start from 0 for the first row/column and go up to rowSize-1 and columnSize-1 respectively.
➢ FUNCTION DEFINITION & DECLARATION ➢ CALLING FUNCTIONS ● To call a function, use its name followed by parentheses (). ● If the function takes arguments, provide the values inside the parentheses. ● If the function returns a value, you can store it in a variable or use it directly in an expression. ● By breaking down a program into smaller functions, developers can easily manage and update specific parts of the code without a ecting the entire program. ● Proper usage of functions enhances code modularity and promotes good programming practices. EXAMPLES: OUTPUT: Result is : 8 OUTPUT: Result is : 8
➢ ACTUAL PARAMETERS
➢ SYNTAX OF FUNCTIONS W/ RETURN VALUES ➢ FUNCTION WITH MULTIPLE ARGUMENTS & RETURN VALUES ➢ LOCAL VS. GLOBAL VARIABLES